I've just implemented ocLazyLoad to my site, however I have a problem that even though the module is being loaded correctly (according to debug anyway) but the Controller apparently still doesnt exist.
application.js: I deleted oc.lazyload from there since it LazyLoads it now (at least I think? When I had it in there but the JS files weren't loaded yet I got module error so..).
routing.js (config file): app.config(['$routeProvider', "$locationProvider",'$translateProvider', '$ocLazyLoadProvider', function($routeProvider, $locationProvider, $translateProvider, $ocLazyLoadProvider)
{
$ocLazyLoadProvider.config({
debug: true,
modules: [
{
name: 'ui.tinymce',
files: [
'../controller/tinymce/tinymce.js',
'../controller/angular-ui-tinymce/src/tinymce.js',
'../../assets/js/app.js?v=140'
]
}
,{
name: 'smoothScroll',
files: [
'../../assets/js/angular-smooth-scroll.js?v=2'
]
}]
});
...
route: '/Support/Ticket/',
templateUrl: templatePath + "support" + "/ticket.html",
resolve: {
eventCtrl: function ($ocLazyLoad) {
return $ocLazyLoad.load(
{
files: ['app/controller/tinymce/tinymce.js',
'app/controller/angular-ui-tinymce/src/tinymce.js',
'assets/js/app.js?v=140']
});
}
}
When visiting the web page it gives me this debug info:
ocLazyLoad.fileLoaded app/controller/angular-ui-tinymce/src/tinymce.js
angular.js?v=4:344 ocLazyLoad.fileLoaded assets/js/app.js?v=140
angular.js?v=4:344 ocLazyLoad.fileLoaded app/controller/tinymce/tinymce.js
angular.js?v=4:344 ocLazyLoad.componentLoaded (3) ["ui.tinymce", "value", "uiTinymceConfig"]
angular.js?v=4:344 ocLazyLoad.componentLoaded (3) ["ui.tinymce", "directive", "uiTinymce"]
angular.js?v=4:344 ocLazyLoad.componentLoaded (3) ["ui.tinymce", "service", "uiTinymceService"]
angular.js?v=4:344 ocLazyLoad.moduleLoaded ui.tinymce
And AFTER the debug Info I get this:
The controller with the name 'TinyMceController' is not registered.
Any Idea how to fix it? If information is missing please tell.
Best regards, Konst