The template SmartAdmin uses lazyScript to import the JS files, it works, everything is fine, but when I navigate between the pages the Ui buttons, to work.
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'
]);
}
}
})
});