Hello I have small probelm: How do you clear the cache after you load a view in ui-router in AngularJS. Please help me
2 Answers
Try this,
app.run(function($rootScope, $templateCache) {
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if (typeof(current) !== 'undefined'){
$templateCache.remove(current.templateUrl);
}
});
});
1 Comment
Kaker
thanks for reply, i have jet one question how to reload current view after load it