Skip to content

Templates with $templateCache

Memphis edited this page May 28, 2018 · 1 revision

Loading Templates with $templateCache

If you want to use the Pro Tip to load your templates with template cache you can simply do the following :

angular.module('ngDialog').run(['$templateCache', function ($templateCache) { $templateCache.put('default', "<div>\n" + "Test" + "</div>\n" + ""); }]);

If you load the $templateCache with the same ngDialog module then you don't have to load another module as dependency.

Clone this wiki locally