Reputation: 13
angular.module('genTemplates', [])
.run(['$templateCache', function($templateCache) {
$templateCache.put('admin-article.html', '<div>......</div>');
......
}]);
ok,i am new to angularJs. what i puzzled is, i've changed the content in admin-article.html but the value of the key 'admin-article.html' remain unchanged....,maybe there are some tools needed to do this?i need your help - - !
Upvotes: 1
Views: 1411
Reputation: 532
You can try:
$templateCache.remove('admin-article.html');
Make sure you are actually having problems with $templateCache, you can open inspector in Chrome, click on the 'Network' tab and refresh the page. You will be able to tell then if it is actually loading your updated template or not.
Upvotes: 1