简体   繁体   中英

Angular component not changing template

In the project I'm working on there some components structured like this:

;(function () {
'use strict'
angular
  .module('a')
    .component('comp', {
      templateUrl: function (Config) {
        return Config.path + '/a/a.template.html'
      }
...

And every component had its own template file, but there were little to no difference beetween them so I created one template file to be used in all of them, but when I changed a.template.html to b.template.html only in some of the components the changes took place, and when I inspected the unchanged elements the HTML that was being used was from a.template.html . Why only some of the components being changed? (Also the components have the same hiarchy and are also really alike)

I figured it out, turns out that my browser was storing the HTML in the cache, so what worked was to just clear the browser cache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM