I try to compile the following code in ADVANCED mode unsuccessfully:
function Config ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'mainpage/mainpage.html',
controller: 'MainpageCtrl'
})
.when('/viewer', {
templateUrl: 'viewer/viewer.html',
controller: 'ViewerCtrl'
})
.otherwise({
redirectTo: '/'
});
}
Is there a special flag to enable?
If I add the following line, it works, but I would like to use ngInect.
Config['$inject'] = ['$routeProvider'];
thank
source
share