Open Zhang-Yida opened 8 years ago
hi,
Am also getting same error, when i trying to load controller via lazy load,
Js file has been loaded in decided location but controller Function not initialized ...
Like this, in app.js
app .config(["$provide", "$compileProvider", "$controllerProvider", "$filterProvider",
function($provide, $compileProvider, $controllerProvider, $filterProvider) {
app.controller = $controllerProvider.register;
app.directive = $compileProvider.register;
app.filter = $filterProvider.register;
app.factory = $provide.factory;
app.service = $provide.service;
app.constant = $provide.constant;
}
]);
This wont work app.controller('HomeCtrl',function(){});
use == > angular.module('app').controller('HomeCtrl',function(){});
// Dashboard .state('dashboard', { url: "/dashboard.html", templateUrl: "views/dashboard.html", data: {pageTitle: 'Admin Dashboard Template'}, controller: "DashboardController", resolve: { deps: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load({ name: 'MetronicApp', insertBefore: '#ng_load_plugins_before', // load the above css files before a LINK element with this ID. Dynamic CSS files must be loaded between core and theme css files files: [ '../../../assets/global/plugins/morris/morris.css', '../../../assets/admin/pages/css/tasks.css',
I am using ui-router with the latest oclazyload#1.0.9, and this happened! Is anyone else has the same quz? How to resolve it ??