1
The template Smartadmin uses lazyScript to import the JS files, it works, it matters all right, but when I navigate between the pages the Ui buttons, stop working.
angular.module('app.analytics', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app.equipmentManagement', {
url: '/gestao-de-equipamento',
views: {
"content@app": {
templateUrl: 'app/views/equipmentManagementAnalytics.html'
}
},
data:{
title: 'Analytics'
},
resolve: {
scripts: function(lazyScript){
return lazyScript.register([
'build/vendor.graphs.js',
'build/vendor.ui.js'
]);
}
}
})
.state('app.correlationAnalytics', {
url: '/correlacao',
views: {
"content@app": {
templateUrl: 'app/views/correlationAnalytics.html'
}
},
data:{
title: 'Analytics'
},
resolve: {
scripts: function(lazyScript){
return lazyScript.register([
'build/vendor.graphs.js',
'build/vendor.ui.js'
]);
}
}
})
.state('app.eventFrame', {
url: '/event-manager',
views: {
"content@app": {
templateUrl: 'app/views/eventManager.html'
}
},
data:{
title: 'Event Manager'
},
resolve: {
scripts: function(lazyScript){
return lazyScript.register([
'build/vendor.graphs.js',
'build/vendor.ui.js'
]);
}
}
})
});