The need
In Angular we use ng-href on link tags to load custom stylesheet. So we need cache busting to work on ng-href attribute.
The solution
Quick and dirty:
The discussion
As there may be need for support for other tags (img...) and other custom attributes what would be the preferred way to customize the behavior? Give in some kind of map of elements and attributes?
For ex:
options: { targets: { link: ['href', 'ng-href'], script: ['src', 'ng-src'] } }
Open to all ideas. Once we agree on a solution, I'll implement it.
The need
In Angular we use
ng-hrefonlinktags to load custom stylesheet. So we need cache busting to work onng-hrefattribute.The solution
Quick and dirty:
ng-hrefsupport -return content.attribs['ng-href'] || content.attribs.href;. The same way we can hardcodeng-srcsupport.ng-hrefandng-srcsupport -var protocolRegEx = /^http(s)?/, elements = $('script[src], script[ng-src], link[rel=stylesheet][href], link[rel=stylesheet][ng-href]');The discussion
As there may be need for support for other tags (
img...) and other custom attributes what would be the preferred way to customize the behavior? Give in some kind of map of elements and attributes?For ex:
options: { targets: { link: ['href', 'ng-href'], script: ['src', 'ng-src'] } }Open to all ideas. Once we agree on a solution, I'll implement it.