ocLazyLoad didnt load js file

240 views Asked by At

when i used 'ocLazyLoad' in my code like below:

var userLoginRoute = {
    name: 'login',
    url: "/login",
    templateUrl: "app/modules/user/loginView.html",
    data: { pageTitle: 'login', bodyClass: 'login' },
    resolve: {
    deps: [
        '$ocLazyLoad', function ($ocLazyLoad) {
            return $ocLazyLoad.load({
                name: 'App',
                insertBefore: '#ng_load_plugins_before', // load the above css files before '#ng_load_plugins_before'
                files: [

                    'app/modules/user/assets/login-rtl.min.css',
                    'app/modules/user/form-login.js'
                ]
            });
        }
    ]
}
};

both of js and css file load successfully but scripts in js file not works.

thanks for helping.

0

There are 0 answers