因为AngularJS的特性,经常需要清除浏览器的缓存来保证浏览器去获得最新的html模板
The reason for that is that Angular fetch a file only once at the begining. You can try to use templateUrl as function and append timestamp so you get new template url each time.
templateUrl: function() {
return 'partials/app-mainsec.html?' + +new Date();
}
But probably, it will refresh your directive only when directive will be compiled.