ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

Files not removed after page change in a single page application. #310

Closed SachinLoonia19 closed 8 years ago

SachinLoonia19 commented 8 years ago

I am using lazyload to load js & css dynamically, which is loading very well. But the thing is when i switched the page not removed, i can see the files there.

Here is the code snippet. "when(objVariables.RouteURLs.ManageEmployees, { templateUrl: objVariables.TemplateURLs.ManageEmployees, controller: 'ManageEmployeeCtrl', caseInsensitiveMatch: true, resolve: { deps: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([{ name: 'modelFile', files: [ 'http://localhost:59618/Content/Js/Settings/ManageEmployee.js', 'http://localhost:59618/Content/Js/bootstrap.min.js', 'http://localhost:59618/Content/Js/jquery.bootpag.min.js', ] }]); }] }"

ocombe commented 8 years ago

Once something is loaded into angular, you have to reload the page completely to unload it. There is no other way, sorry.