1

我有以下代码:

.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,但它也不起作用。任何想法?

4

0 回答 0