I am developing an application that has different configurable versions - "a1" and "a2". The version name is initially being set from the database as "a1" in the $rootScope.
I reference the version name in every templateProvider in UI-Router, which ends up being over 30 times:
.state('app.auto.public.inventory.list', {
url: '/',
views: {
'[email protected]': {
templateProvider: ['$rootScope', '$templateCache', function($rootScope, $templateCache) {
return $templateCache.get($rootScope.autoVersion + '/html/inventory/list/index.html');
}],
controller: 'InventoryList'
}
}
})
There must be a better way to access the value of "a1", instead of referencing $rootScope.autoVersion so many times?