本文整理匯總了TypeScript中angular.ITemplateCacheService.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ITemplateCacheService.get方法的具體用法?TypeScript ITemplateCacheService.get怎麽用?TypeScript ITemplateCacheService.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angular.ITemplateCacheService
的用法示例。
在下文中一共展示了ITemplateCacheService.get方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("should submit new revision of page, update template cache, show success message, and route to page editor", () => {
spyOn(pageEditorService, "postPage").and.callFake(() => {
const deferred: IDeferred<any> = $q.defer();
deferred.resolve();
return deferred.promise;
});
ctrl.editor = TestPageWithContent;
ctrl.editor.PageContent = "<div>new content</div>";
ctrl.submit();
expect(pageEditorService.postPage).toHaveBeenCalledWith("read-andallo", 3, {
PageTitle: "...And All Other Mind Altering Substances",
PageContent: "<div>new content</div>",
Status: "ACTIVE",
ContentType: "R",
ImageFilename: "PAMPHLETS_All_Other"
});
$scope.$digest();
expect(alertModalService.show).toHaveBeenCalledWith({
style: "info",
title: "Information",
message: "Page successfully published"
});
expect($location.path()).toEqual("/page/pageeditor");
expect($templateCache.get("page/read-andallo.html")).toEqual("<div>new content</div>");
});