How to resolve multi function in UI-Router with ocLazyLoad

Posted in General by essivision Mon Apr 11 2016 13:25:15 GMT+0000 (Coordinated Universal Time)·Viewed 836 times

Hi I want to resolve multi function and pass to controller with ocLazyLoad. .state('admin.editUser',{ url: "/users/:id/edit", templateUrl: "app/modules/user/views/userform.html", ncyBreadcrumb: { label: 'New User', parent:'admin.users' }, data: { permits: { withOnly: 'edit_user' } }, controller:'UserEditCtrl', resolve: { dep: ['$ocLazyLoad', function( $ocLazyLoad ){ return $ocLazyLoad.load(['dropzone','RoleServiceModule','UserServiceModule']).then( function(){ return $ocLazyLoad.load(['app/modules/user/controllers/UserEditCtrl.js']); } ); }], resolvedItems:['dep','UserService','$stateParams', function(dep,UserService,$stateParams) { return { user:function() { return UserService.show($stateParams.id).then(function(data) { return data; }); }, roomNo:function(data) { return "100"; } }; }] } })
  
Markdown is allowed