Open essivision opened 8 years ago
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"; } }; }] } })
Hi
I want to resolve multi function and pass to controller with ocLazyLoad.