This tag is for ocLazyLoad, a solution for lazy loading with AngularJS.
Questions tagged [oclazyload]
133 questions
0
votes
0 answers
Questions on the lazyload method
I added the lazyload to the image tags. Saw the loading and then the actual image. I was shocked to see the code change (src, lazyloaded) when viewing the source code.
Source code:


Sam Mah
- 31
- 6
0
votes
1 answer
Angular-CLI: Change lazy chunk location
I'm trying to migrate from AngularJS to Angular. I've got a angularjs-module which is loaded via lazyloading (with ocLazyLoad) after the user loggs in. I managed to achieve this by changing the routing to
lazyLoad: ['$q', '$ocLazyLoad', function($q,…

Vortilion
- 406
- 2
- 6
- 24
0
votes
1 answer
How does webpack do code splitting for vendor file in this sample app
I am new to Webpack. I understand basic concepts of bundeling, code-splitting and chunks, etc.
Now I am trying to sprinkle "Webpack magic" into a legacy angularjs app that uses ui-router. So I downloaded the following sample app from ui-router…

WebMatrix
- 1,561
- 3
- 12
- 17
0
votes
3 answers
AngularJS - How do I get the state name inside of state resolve function to load controller files?
I am making head ways into diving into my first complete AngularJS app using PHP and tailored toward an api-centric approach.
I have reached this point:
I want to be able to capture the state name inside $stateProvider below for purpose of passing…

Vahe
- 1,699
- 3
- 25
- 76
0
votes
0 answers
AngularJS - Controller not registered with ocLazyLoad
I've just implemented ocLazyLoad to my site, however I have a problem that even though the module is being loaded correctly (according to debug anyway) but the Controller apparently still doesnt exist.
application.js:
I deleted oc.lazyload from…

Konstantin Schlegel
- 55
- 1
- 5
0
votes
0 answers
OCLazyLoad with MVC Bundles
I use MVC bundling to bundle JS files:
bundles.Add(new ScriptBundle("~/bundles/essentialjs").Include(
"~/Scripts/spa/features/exception/exceptionModule.js",
…

DotnetDude
- 11,617
- 35
- 100
- 158
0
votes
1 answer
Destroying $scope manually
tl;dr
Application loads modules, refreshes every X minutes, does not destroy module instances on reloading. $scope.$on('$destroy') does not get called. Modules DDoS API and slow down application. Manual $broadcast from applicaton controller to…

ZeroThe2nd
- 1,652
- 1
- 12
- 15
0
votes
0 answers
ngroute ocLazyLoad only run once
i am new in angularjs and javascript.
my ngroute and ozlazyload runs successfully but only once.
SPLK.config(function ( $ocLazyLoadProvider, $routeProvider) {
$ocLazyLoadProvider.config({
loadedModules: ['SPLK'],
modules: [
…

Faizal Nor
- 13
- 1
- 6
0
votes
2 answers
`serie: true` cannot ensure loading order of modules
I want to load CodeMirror by ocLazyLoad. Since xml.min.js, htmlmixed.min.js, css.min.js, etc. all need codemirror.min.js to be loaded before them. I try to use serie: true to make sure the loading order:
$ocLazyLoadProvider.config({
debug:…

SoftTimur
- 5,630
- 38
- 140
- 292
0
votes
1 answer
Lazy-load certain files for routes that don't begin with `addin`
I have a website build by AngularJS and angular-ui-router. In index.html, I load a lot of .js and .css files.
Now, I realize that a part of these .js and .css files are not necessary for the routes like https://localhost:3000/addin/.... So I want to…

SoftTimur
- 5,630
- 38
- 140
- 292
0
votes
1 answer
Do scripts loaded with ocLazyLoad get cached by the browser?
Sorry if this is a newbish question.
I'm using the ocLazyLoad plugin with AngularJS and UI Router. I am using ocLazyLoad with Ui router to dynamically load/lazy-load in my controllers based on the route that is hit in my webapp.
My question is will…

Craig
- 620
- 6
- 15
0
votes
0 answers
Redirect state to otherwise after refresh page
I use oclazyload to inject modules in my app, and ui-router to create states, everything work fine i can move between state home or users but when we change state to users.list and press F5 (refresh) state return to the otherwise state…

Maher
- 2,517
- 1
- 19
- 32
0
votes
1 answer
$oclazyload not working with AngularJS 1.5
I am facing an issue in the implementing $oclazyload to defer loading of my components as shown below
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import providerComponent from './provider.component';
let providerModule…

runchu
- 151
- 2
- 10
0
votes
0 answers
ocLazyLoad and angular.bootstrap
I want to add a ocLazyLoad in my mean-stack website. Here is the code:
.state('kpi', {
url:'/kpi',
templateUrl: '/htmls/kpi.html',
resolve: {
loadMyCtrl: ['$ocLazyLoad', function ($ocLazyLoad) {
…

SoftTimur
- 5,630
- 38
- 140
- 292
0
votes
1 answer
Angular 1 ocLazyLoad - Use with extended controllers
I've used ocLazyLoad to load a controller for a ui-router state with a resolve function in the state definition, and within this controller I've used angular.extend to extend my main controller with child controllers like…

nick.cook
- 2,071
- 4
- 18
- 36