1

I have the code below:

.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',
                ]
            });
        }]
    }
})

and the configuration is:

MetronicApp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) {
$ocLazyLoadProvider.config({
    debug: true
});
}]);

I am getting the error:

Error: [ng:areq] Argument 'FeedbackController' is not a function, got undefined

What did I do wrong? I also tried to inject FeedbackController in the parent state but it also doesn't work. Any idea?

Burak
  • 5,706
  • 20
  • 70
  • 110

0 Answers0