This tag is for ocLazyLoad, a solution for lazy loading with AngularJS.
Questions tagged [oclazyload]
133 questions
0
votes
1 answer
Load ui-router states dynamically
After a successful login to my app I want to dynamically load all states available to the user from api/js. The dynamically loaded states will always include an abstract state app.module which is the only known state and which is root to all other…

Peter Hedberg
- 3,487
- 2
- 28
- 36
0
votes
0 answers
Using oclazyload with $stateProvider giving controller is undefined
I am very new to Angular and am trying to figure out authentication for a Flask Angular app. I think the issue is related to the fact that I am not defining the services.js dependency clearly.
I was getting AngularJS error.
You can see a bit more…

tonestrike
- 320
- 6
- 22
0
votes
0 answers
Load dependencies after loading view or Template file with AngularJS and $ocLazyLoad
I am writing an application with AngularJS. There is a lot of widgets that must be activated using the dependencies scripts. The scripts must run after the contents of the view have been loaded. I have the following state;
.state('dashboard', {
…
user5500750
0
votes
0 answers
How to implement lazy loading for multiple modules
I need to implement lazy loading for my project which uses AngularJs, RequireJs, Grunt.This is a very large project and it is divided into multiple modules containing their separate controller, service and routing.js files. I tried my hands on…

Priyanca Kamra
- 21
- 7
0
votes
1 answer
Hiding empty templates until the data is loaded with Restangular and UI-Router
I use ocLazyLoad to dependency injection and load CSS & JS on-demand. I would not change UI-Router state until the data has been loaded. Also I use Restangular to connect API.
Now how to call Restangular function from resolve state? It's my…

Ehsan Ali
- 1,362
- 5
- 25
- 51
0
votes
1 answer
how to load angular-bootstrap
Problem: I could not load the ui-bootstrap-tpls.js from node_modules
Error: [$injector:nomod] Module 'angular-bootstrap' is not available!
You either misspelled the module name or forgot to load it. If
registering a module ensure that you…

riadh zar
- 329
- 1
- 2
- 7
0
votes
2 answers
controller not defined when using OC lazyloading
I'm trying to lazy load my JS files with oclazyload module.
but I'm getting this error
Uncaught ReferenceError: dashboardController is not defined
while my files are correctly loaded.
here is the state declaration
.state(
"dashboard",
{
…

Med
- 241
- 1
- 6
- 23
0
votes
1 answer
How do I load a file from bower_component within AngularJS UI router?
I would like to load a file when a specific URL is hit, but I didn't have any success with it yet:
This is how my code looks like:
.state('admin.resources', {
url: '/resources',
templateUrl: 'views/admin/resources.html',
…

Lulzim Fazlija
- 865
- 2
- 16
- 37
0
votes
1 answer
Angular (1.5.0) ng-router not working
I'm using angular,angular-animate,angular-route v.1.5.0 , ui-grid v. 3.0.7
ocLazyLoad v. 1.0.9.
I get this error :
TypeError: a is not a function
at d (angular-animate.js:2141)
at angular-animate.js:2131
at h (angular-animate.js:3174)
at…

user40101121
- 167
- 2
- 9
0
votes
1 answer
Incorporating oc lazyload with gulp-angular
How can I incorporate oc lazyload to work with gulp-angular yeoman generator , Since running gulp will inject all the dependencies in the scripts folder. How can I configure oc lazyload to inject the dependencies instead ?

32teeths
- 1,469
- 1
- 15
- 32
0
votes
2 answers
Lazy loading angular app doesn't load a directive
I'm trying to lazy load a directive in my angular app, using ui.router and oc.lazyLoad. Here is my code :
menu :

magneto
- 105
- 2
- 15
0
votes
1 answer
'Unknown provider' error while retrieving lazy-loaded controller
I want 'MyController2' to inherit 'MyController1', however, both controllers are lazyloaded using ocLazyLoad. According to Jussi Kosunen's answer to this question (https://stackoverflow.com/a/15292441/2197555), I have made a function…

gm2008
- 4,245
- 1
- 36
- 38
0
votes
1 answer
AngularJS service in metronic template
I have created a service that performe the logout and saves the username of the user logged.
angular.module('MetronicApp').service('userService', ['$http', function($http) {
/**
* Log out user session
* @return {Object} The…

Fr4ncx
- 356
- 6
- 22
0
votes
1 answer
Load on demand controller js file with ocLazyLoad in AngularJS
I have problem in load on demand controller js file with ui-router and error me:
Argument 'FormController' is not a
My code is:
'use strict';
var Request = angular.module('Request',['ui.router','oc.lazyLoad'])
.config(function($stateProvider)…
user4540007
0
votes
1 answer
How can I lazy configure types of angular formly?
I'm trying to lazy configure custom types of angular-formly with ocLazyLoad but I cannot. When the state is executing I'm trying to call the setType function but the page does not load anything after that. When I remove the setType function…

CodeArtist
- 5,534
- 8
- 40
- 65