我有以下代码:
.state('shops', {
abstract: true,
url: "/shops/:shopid",
data: {
pageTitle: 'Shop Settings'
},
views: {
'content@': {
templateUrl: "views/shops.html",
}
},
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'MetronicApp',
insertBefore: '#ng_load_plugins_before',
files: [
'js/controllers/ShopDetailController.js',
'css/views/ngTable.css',
]
});
}]
}
})
.state('shops.feedbacks', {
url: "/feedbacks",
data: {
pageTitle: 'Feedbacks',
requireLogin: true
},
ncyBreadcrumb: {
label: 'Feedback Management'
},
views: {
'detail': {
templateUrl: "views/feedbacks.list.html",
controller: "FeedbackController"
}
},
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'MetronicApp',
insertBefore: '#ng_load_plugins_before',
files: [
'js/controllers/FeedbackController.js',
]
});
}]
}
})
,配置为:
MetronicApp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) {
$ocLazyLoadProvider.config({
debug: true
});
}]);
我收到错误:
Error: [ng:areq] Argument 'FeedbackController' is not a function, got undefined
我做错了什么?我也尝试在父状态下注入FeedbackController,但它也不起作用。任何的想法?