Questions tagged [oclazyload]

This tag is for ocLazyLoad, a solution for lazy loading with AngularJS.

Resources

133 questions
0
votes
0 answers

unable to init ocLazyLoad error

I am trying to load oclazyload by injecting oc.lazyload module dependency in below code: define([ 'angular', 'ui-bootstrap', 'ocLazyLoad'], function initModule(angular) { 'use strict'; angular.module('myModule', [ …
jass
  • 343
  • 3
  • 15
0
votes
0 answers

The controller with the name 'StaticPageController' is not registered ocLazyLoading + routeProvider

I've been tring to use ocLazyLoad but this works fine when controller file is cached. I mean for the first visit it gives me controller undefined error but when I visit second time it works fine. Please help (function() { 'use strict'; …
Mohammad Hani
  • 208
  • 4
  • 14
0
votes
1 answer

Load resources in angular with oclazyload and webpack

I have a modular app who have multiple vendor plugins and I need to load only necessary in every view. This is my routes: (function() { 'use strict'; angular.module('app.empresas').config(config); function config($stateProvider,…
50l3r
  • 1,549
  • 4
  • 16
  • 27
0
votes
2 answers

Clearing cache when version changes using oclazyload

I am using oclazyload in my angular app, also I am setting version in my app. So whenever version number changes I need to clear the cache. is there any method to implement that? angular.module('app') .run(['$rootScope',function ($rootScope) { …
Ebin Manuval
  • 1,235
  • 14
  • 33
0
votes
1 answer

How can I remove CSS files loaded via $ocLazyLoad from a particular ui-router state?

Here is the basic setup of my app: I have a main application (myApp) and two modules underneath (view1, view2). Here is myApp: angular.module('myApp', [ 'ngRoute', 'ui.router', 'oc.lazyLoad', 'myApp.view1', 'myApp.view2', …
0
votes
1 answer

Avoid code duplication in angular routing with oclazyload and webpack code splitting

I'm currently using angular 1.5 in a project and my routing looks like this: const routes = ($stateProvider) => { $stateProvider .state('update', { url: '/update', template: '', resolve: { lazyload:…
superphung
  • 105
  • 2
  • 9
0
votes
1 answer

LazyLoad Module in Angular 1.5 component Meteor

I am dying here on lazily loading modules into angular-meteor 1.5. So the Meteor Version is 1.4.2.3, meaning with ES2015, import, ui-router etc. So far I've tried ocLazyLoad, angularAMD has a completely different syntax (with define(function()...)…
user3819370
  • 513
  • 1
  • 6
  • 15
0
votes
2 answers

how to integrate a static landing page with its own design at root route using ui-router

I am working on an angular js 1.x application by using ui-router and have come up with a bottleneck since I am new to angular js ,so please forgive me if I sound silly. Problem: I have a main angular js app which has its own css files and script…
fullmetal
  • 414
  • 3
  • 11
0
votes
1 answer

Lazy loading controller from separate file using state provider

So, I'm trying to dynamically load a file that adds a controller to my main module. The thing is that I don't want to reference the file itself in a script tag. To be more specific, I have 2 controller files. The main controller file…
Axel
  • 414
  • 1
  • 7
  • 21
0
votes
0 answers

Inject lazy loaded controller into app

I am trying to register a controller that I load dynamically thanks to ocLoazyLoad. Once I have loaded the JS file, how to I tell the app that there is a new controller ? I am doing this inside a controller (when loading a modal, I load the…
YannickHelmut
  • 555
  • 1
  • 7
  • 20
0
votes
0 answers

ocLazyLoad didnt load js file

when i used 'ocLazyLoad' in my code like below: var userLoginRoute = { name: 'login', url: "/login", templateUrl: "app/modules/user/loginView.html", data: { pageTitle: 'login', bodyClass: 'login' }, resolve: { deps: [ …
0
votes
0 answers

ocLazyLoad and Angular UI Router

I'm using oclazyload to load an Angular controller dynamically, when I enter a specific nested state. That nested state: .state('login.home', { url: "home", views: { "nav-right": { templateProvider: function($http, $stateParams) { …
Summer Developer
  • 2,056
  • 7
  • 31
  • 68
0
votes
1 answer

How to get razor rendered html from angularjs with ngRoute

I am using ocLazyLoad library to lazy load angular javascript/html files and inject them to my module like this code snippet: $routeProvider.when('/Home/Index', { templateUrl: '/app/Index.html', controller: 'IndexController', …
kadir
  • 1
  • 2
0
votes
1 answer

Lazy loading modules

Whenever I attempt to go to profile state I'm thrown back to the home state (no errors in console). Here's my setup: app.js angular.module('app',[ 'oclazyLoad' 'app.components' ]) .config(['$stateProvider', '$urlRouterProvider',…
Muli Yulzary
  • 2,559
  • 3
  • 21
  • 39
0
votes
2 answers

Angular Best Practice : Lazyload vs Concatenation

I have built many angular applications, and each time I try to improve app performance , architecture .. etc. One strategy some people follow is to concatenate all JavaScript files in one minified file, and also all stylesheet files in one minified…
ProllyGeek
  • 15,517
  • 9
  • 53
  • 72
1 2 3
8 9