You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having the problem that ocLazyLoad doesn't work within the app config (where all my routing stuff is located). It does work in controllers but I need it in the config to make js files load on demand.
When adding:
routing.js $ocLazyLoad.load({files: ['forum/community-forum.controller.js']});
I get the following error:
Failed to instantiate module arazpvp due to:
ReferenceError: $ocLazyLoad is not defined
at https://araz4story.com/pvp/app/bin/routing.js?v=187:5:2
at Object.invoke (https://araz4story.com/pvp/assets/js/angular.js?v=4:155:70)
at d (https://araz4story.com/pvp/assets/js/angular.js?v=4:148:171)
at https://araz4story.com/pvp/assets/js/angular.js?v=4:149:125
at p (https://araz4story.com/pvp/assets/js/angular.js?v=4:8:184)
at g (https://araz4story.com/pvp/assets/js/angular.js?v=4:148:72)
at eb (https://araz4story.com/pvp/assets/js/angular.js?v=4:156:654)
at c (https://araz4story.com/pvp/assets/js/angular.js?v=4:79:175)
at Pc (https://araz4story.com/pvp/assets/js/angular.js?v=4:79:488)
at ue (https://araz4story.com/pvp/assets/js/angular.js?v=4:77:283
The text was updated successfully, but these errors were encountered:
Hey,
I'm having the problem that ocLazyLoad doesn't work within the app config (where all my routing stuff is located). It does work in controllers but I need it in the config to make js files load on demand.
routing.js
app.config(['$routeProvider', "$locationProvider",'$translateProvider', '$ocLazyLoadProvider', function($routeProvider, $locationProvider, $translateProvider, $ocLazyLoadProvider)
index.html
<script type="text/javascript" src="assets/js/ocLazyLoad.js?v=1"></script>
application.js
var app = angular.module("arazpvp", [ 'ngRoute', 'ngStorage', 'angular-encryption', 'ui.tinymce', 'smoothScroll', 'ngCookies', 'pascalprecht.translate', 'oc.lazyLoad']);
When adding:
routing.js
$ocLazyLoad.load({files: ['forum/community-forum.controller.js']});
I get the following error:
The text was updated successfully, but these errors were encountered: