I've been experimenting with loading different templates in this manner:
<div ng-class="{active:$first,in:$first,'tab-pane':true}" id="{{p.path}}_settings" ng-repeat="p in panes" ng-include="buildPath(p.path)">
</div>
Here's the accompanying controller:
$scope.panes = [{
name: 'xxx',
path: 'alarm'
}, {
name: 'yyy',
path: 'scan'
}, {
name: 'zzz',
path: 'client'
}];
$scope.buildPath = function(path) {
return 'templates/partials/settings_' + path + '.html';
}
Everything was working smoothly. However, I decided to disable caching by adjusting the path:
$scope.buildPath = function(path) {
return 'templates/partials/settings_' + path + '.html?_=' + Date.now();
}
After making this change, the browser encountered issues loading duplicate pages.
Any suggestions on what may have caused this? Could it be a bug?