Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to load files from other state to another state? #407

Open
emjey23 opened this issue Aug 29, 2017 · 0 comments
Open

Is there a way to load files from other state to another state? #407

emjey23 opened this issue Aug 29, 2017 · 0 comments

Comments

@emjey23
Copy link

emjey23 commented Aug 29, 2017

Example is I had a state looks like this that has many files, is there any way/solution that I can load this same files to another state such as state("editAdmin")?

My other question is there another way that I can minimize or prettify my codes like instead of typing all individual files, $ocLazyLoad.load will read files inside a folder.

`$stateProvider.state("admin", {
    url:"/admin",
    controller: "AdminController",
    templateUrl: "html/admin/adminHome.html",
    resolvePolicy: {loadMyCtrl : {when: "LAZY", async: "WAIT"}},
    resolve: {
        loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad){
            return $ocLazyLoad.load(['css/bootstrap.min.css', 'css/bootstrap-responsive.min.css',
            'css/fullcalendar.css', 'css/matrix-style.css', 'css/matrix-media.css',
            'css/jquery.gritter.css', 'js/excanvas.min.js', 'js/jquery.ui.custom.js',
            'js/bootstrap.min.js', 'js/jquery.flot.min.js', 'js/jquery.flot.resize.min.js',
            'js/jquery.peity.min.js', 'js/fullcalendar.min.js', 'js/matrix.js',
            'js/matrix.dashboard.js', 'js/jquery.gritter.min.js', 'js/matrix.interface.js',
            'js/matrix.chat.js', 'js/jquery.validate.js', 'js/matrix.form_validation.js',
            'js/jquery.wizard.js', 'js/jquery.uniform.js', 'js/select2.min.js',
            'js/matrix.popover.js', 'js/jquery.dataTables.min.js', 'js/matrix.tables.js'
            
            ])
        }]
    }
    })

    .state("editAdmin", {
    url:"/editAdmin/:id",
    controller: "EditAdminController",
    templateUrl: "views/",
    })`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant