Ui.Router loads / imports JS files, but buttons lose functionality

1

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'
                    ]);
                }
            }
        })
});
    
asked by anonymous 06.09.2017 / 14:55

1 answer

0
The template does not recognize widgets , because the data-widget-grid directive can not contain itself in another div .

I solved only by removing the data-widget-grid directive from children.

    
12.09.2017 / 16:51