Wait loading 1st file for loadgin second file with a router ?

Posted in General by W-prog Thu Feb 09 2017 10:48:36 GMT+0000 (Coordinated Universal Time)·Viewed 800 times

Hello, I want load file whan i call my state like this [code] .state('myState', { url: "/myUrl", templateUrl: "views/myView.html", controller: "myController", resolve: { deps: ['$ocLazyLoad', function($ocLazyLoad) { return $ocLazyLoad.load({ name: 'myRoute', insertBefore: '#ng_load_plugins_before', files: [ 'provider/provider1.js', 'provider/provider2.js', 'provider/provider3.js', 'controler/mycontroller.js' ] // here todo Callback files for loader the second controller } //, Or here ? todo Callback files for loader the second controller ); }] } }) [/code]
  
Markdown is allowed