Questions tagged [oclazyload]

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

Resources

133 questions
0
votes
0 answers

Angular ocLazyLoad not load for second time

I'm using ocLazyLoad and initialize it at ui-router resolve: $stateProvider .state('user', { url: '/user', resolve: { loader: ['$ocLazyLoad', function ($ocLazyLoad) { return…
ssuhat
  • 7,387
  • 18
  • 61
  • 116
0
votes
1 answer

Can't lazy load controllers in angular with oc.lazyLoad - controller not found

I want to use lazy loading in my Angular project: This is the relevant app.js code: var app = angular.module('eva', ['ui.router', 'controllers', 'oc.lazyLoad']); app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider',…
stijn.aerts
  • 6,026
  • 5
  • 30
  • 46
0
votes
1 answer

lazy loaded controller results in error when transitioning to state

Receiving this error... Error: [ng:areq] Argument 'registerController' is not a function, got undefined when attempting to transition to a ui-router state... .state('register', { url: "/register", templateUrl:…
0
votes
1 answer

How can I declare the dependencies of lazy loaded (ocLazyLoad) features (e.g. ngAnimate, ui-bootstrap,..)?

I want to load angular-animate and angular-ui-bootstrap only for a certain view and for this reason I use oc.lazyLoad. In most cases it works properly. In the following example I have some troubles (Errror: [$injector:nomod] Module 'ngAnimate' is…
user2227400
0
votes
1 answer

AngularJS Configuration Structure

I want to summarize all module configurations within a block and it doesn't work and I don't get any error message. The following works: angular.module('myApp', [ 'ngRoute', 'oc.lazyLoad', 'myApp.login', ]). config( [ …
user2227400
0
votes
0 answers

Best way to use Require JS

I've been playing with require JS now. This is my config, var require = { baseUrl: 'app/', paths: { 'angular': '../scripts/angular', 'ui-router': '../scripts/angular-ui-router', 'ocLazyLoad':…
Anonymous Duck
  • 2,942
  • 1
  • 12
  • 35
0
votes
3 answers

Injecting into lazy loaded AngularJS Controller when using ocLazyLoad

I started using ocLazyload to lazy load few of my AngularJs controllers. I have used it along with the $routeProvider like this $routeProvider.when("/login", { templateUrl: "login.html", resolve: { loadCtrl:…
Dhanush Gopinath
  • 5,652
  • 6
  • 37
  • 68
0
votes
1 answer

Angular - Call function when all JS has been loaded

I want to call a function when all my files (JS) are loaded (because I would like to call a function that's inside one of these files). How do I do that? .state('dashboard', { url: "/dashboard.html", templateUrl:…
Calvin
  • 347
  • 1
  • 4
  • 18
0
votes
1 answer

Unknown provider $ocLazyLoad when using with TypeScript

I am trying to use $ocLazyLoad inside of Angular.js with TypeScript. However I keep getting a Unknown provider error. I am including it in my primary app: index.module.ts /// ///
lightswitch05
  • 9,058
  • 7
  • 52
  • 75
0
votes
2 answers

oc.lazyload not working with ui-router, js loaded but controller not initialized

I'm trying to use ui-router with lazyload, from chrome I can see the required js is loaded but angular throws an error. From the error I can tell the controller is not initialised, attached the router code: var app = angular.module('aaaaa',…
daisy
  • 22,498
  • 29
  • 129
  • 265
-1
votes
1 answer

ng-show/ng-hide doesn't work with lazy load of controller

I am loading a state with ocLazyLoad. The controller of that state has this code in the start. $scope.test = {show: false}; and in html view I have this Now when my view is loaded the…
Achilles
  • 519
  • 7
  • 27
-1
votes
1 answer

Angular Material Templates loaded with webpack doesnt get css applied

I'm adapting one angular 1 project to use the webpack module bundle system. Almost everything is working as expected, but one material component doesnt get applied well. It is the md-input-container. What I think it is the cause of the problem: I'm…
vmvini
  • 62
  • 6
-4
votes
1 answer

Delay pop up tag with lazy load

I want this popup tag can be loaded after 60 seconds of full page load with Lazy load or jquery. because settimeout and setinterval never worked.