Ask a Question

Can I use cache parameter with oc-lazy-load directive?

Hi! Just wondering if it's possible to use cache parameter when using oc-lazy-load directive? I need to turn off caching. Something like this: <div oc-lazy-load="['widgets/widget/widgetModule.js']" oc-cache="false" ... "> Thanks in advance! -Kalle

CacheBust with Oclazyload

Hi team, I am using OcLazyLoad in my application and it is working pretty fine, i just want to know if there is a solution that allow to give a file a unique hash as Cachebust. Indeed, the cache attribute given is loading files each time we need a lazy loaded module. Thanks in advance. Squad

Configurable OCLazyLoad

Hi team, I am using OcLazyLoader in my application and it is working pretty fine, i just want to know if there is any way i can make OCLAzyLoader configurable. By configurable i mean i can use it as a Switch, when i want i can use it and when i don't want i can turn it off. So is there any method or any event with which i can achieve this. Thanks in advance.

OcLazyLoad & JWT

Hi, I'm trying to use JSONWEBtoken authentication with ocLazyLoad, but can´t insert the token in the lazy load file request, I've tried to set the header in the ocLazyLoadProvider config, but it dosen't work. I found the solution inserting the token in the params of the request, but this is an ugly solution, and I want to find the way to insert the authentication JWT in the header. Thanks a lot

How to lazy load module and service in ui router ?

lazy load

i have a dashboard which users two controllers and these two controllers are in different file. can i know how to load two controllers using lazyload. below is the code which i have altered by does not work firsttime. when i open the page that uses the second controller and close then the dash board works fine. .state('dashboard.home',{ url:'/home', controller: 'MainCtrl', templateUrl:'views/dashboard/home.html', resolve: { loadMyFiles:function($ocLazyLoad) { return $ocLazyLoad.load({ name:'sbAdminApp', files:[ 'scripts/controllers/main.js', 'scripts/directives/timeline/timeline.js', 'scripts/directives/notifications/notifications.js', 'scripts/directives/chat/chat.js', 'scripts/directives/dashboard/stats/stats.js' ] }) $ocLazyLoad.load({ name:'sbAdminApp', files:['scripts/controllers/pvContoller.js'] }) } } })

ocLazyLoad File not found

I have try to implement ocLazyLoad but getting error when it load Error: http://errors.angularjs.org/1.5.5/ng/areq?p0=loginController&p1=not%20a%20function%2C%20got%20undefined $stateProvider .state('Login', { url: '/', templateUrl: 'View/Login.jsp', controller : 'loginController', containerClass: 'lock-screen', pageLayout:'beforeLogin', PageTitle:'Login - FORTLABS', resolve:{ Login : function($ocLazyLoad) { return $ocLazyLoad.load( { name: "Login", files:['js/Controller/loginController.js'] } ) } } })

Dispose an object

How do I dispose a object loaded? That's possible?

How to resolve multi function in UI-Router with ocLazyLoad

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"; } }; }] } })

Does not seem to work with Stripe

The following code doesn't work: $ocLazyLoad.load('https://js.stripe.com/v2/').then(function () console.log('stripe loaded'); }); It doesn't load the script at that location and doesn't reach the console.log line. It seems something about the URL breaks the script loading. Any ideas? Thanks for the great library!