Questions tagged [oclazyload]

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

Resources

133 questions
1
vote
0 answers

Controller not getting executed using ocLazyLoad

I have added below config for controller $ocLazyLoadProvider.config({ 'debug': true, // For debugging 'true/false' 'events': true, // For Event 'true/false' 'modules': [{ // Set modules initially name : 'usersCtrl', // State1 module files:…
Pinal
  • 41
  • 8
1
vote
1 answer

How to lazyload a controller in angular?

In my angularjs app I am trying to lazyload a controller like this: $scope.loadView4Ctrl = function () { console.log('loadview4ctrl'); $ocLazyLoad.load({ name: "View4", files: [ 'view4/view4.js' ] …
bier hier
  • 20,970
  • 42
  • 97
  • 166
1
vote
0 answers

ocLazyLoad not allowing to execute jasmine test case

I recently added ocLazyLoad module in my app. I am executing jasmine unit test case for home.controller.js. In home.route.js I have following code app.config(['$stateProvider', 'homeConfig', 'stateHelperServiceProvider', function…
1
vote
0 answers

Configuring dynamic state in ui-router

I need to configure dynamic state with dynamic template and url. .state('s1.s2.:s3',{ url: "/name", templateUrl: ["$stateParams",function($stateParams) { return 'path/' + $stateParams.s3 + '.html'; …
Rishi0405
  • 354
  • 1
  • 11
1
vote
1 answer

What is the right way to let the lazyloaded file (*.ts) to be compiled

When lazyLoading script files via oclazyloader for angularjs like: $stateProvider .state('tokenReceived', { url: '/somurl', //templateUrl: '/views/index.html', controller: "controllers.loremCtrl", resolve: { deps:…
Ben jamin
  • 946
  • 1
  • 6
  • 18
1
vote
1 answer

How to handle 404 - resource not found error in ocLazyLoad

I like to know how I could handle resource loading errors in ocLazyLoading. I try to load some resources in the resolve part inside my $stateProvider. There is one file ctrl.js which is available to load. Another file called iam-not-there.js is…
lin
  • 17,956
  • 4
  • 59
  • 83
1
vote
0 answers

Lazy Loading a service using oclazyload

This is index.html
honey
  • 23
  • 1
  • 7
1
vote
1 answer

ocLazyLoad controller dependency data resolve issue

I have a situation where i am loading a service and controller with ocLazyLoad in angular js, which is working as expected. But, i also want to pass some data to controller by using the service which is resolved by ocLazyLoad and unfortunately i am…
1
vote
0 answers

Can we use oclazyload in controller level other than resolve? If so in what scenarios we can use oclazyload in controller other than directives?

Something like this which i found in oclazyload example angular.module("LazyLoadTest", ["oc.lazyLoad"]) .controller("TestController", function($scope, $ocLazyLoad, $compile) { …
Sharmila
  • 785
  • 4
  • 11
1
vote
0 answers

Can ocLazyLoad be used to augment a controller and have access to its scope?

I think I may be able to use ocLazyLoad to solve my problem, but couldn't easily determine from the documentation. I would like to do something like this: MyApp.controller('page', ['$scope','$http', 'socketManager', '$ocLazyLoad', function ($scope,…
HiDefLoLife
  • 555
  • 1
  • 8
  • 28
1
vote
1 answer

lazyloading ngTable using ocLazyLoad

In one our projects we're trying to write a wrapper around ngTable library! in this component's controller, we're loading ngTable using ocLazyLoad. Here's what we've written: Datagrid Component (function() { 'use strict'; angular …
mamsoudi
  • 3,999
  • 1
  • 15
  • 24
1
vote
1 answer

Loading components and other dependencies with ocLazyLoad plugin

I'm working with AngularJS and ocLazyLoad plugin. And I can't find a solution for my problem. I have created one component (named as component.js) and controller for this component (in separate file componentCtrl.js) and then I have constants, which…
bajky
  • 332
  • 6
  • 17
1
vote
0 answers

how loading more than one module and dependency injection in one route in Angular app using ocLazyLoad?

I could inject lazy loaded libraries to my modules according to this Stackoverflow answers, but the answer is just describing and working with injecting one module (even with more than one file). But, I have a route and I want to lazy loading two…
1
vote
1 answer

How to use ocLazyLoad dependency injection inside controller?

I'm using ocLazyLoad to lazy loading my dependencies according to route (and controller), the modules that are already injected to application, but, how can I add a dependency injection inside my controller? Is it possible? For example, in one of my…
Lasho
  • 11
  • 1
1
vote
0 answers

ocLazyLoad angular load js file synchronously

Here my code. var app = angular.module('app', [ 'oc.lazyLoad', 'ui.router', 'ncy-angular-breadcrumb' ]); app.config([ '$ocLazyLoadProvider', function($llp) { $llp.config({ debug : true }); } ]); …
co len
  • 81
  • 2
  • 11
1 2 3
8 9