This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
bug(ngComponentRouter): Working code with Angular 1.5.0 breaks with 1.5.2 #14284
Closed
Description
I declare $routerRootComponent like this:
(function() {
'use strict';
angular.module('app', ['app.config', 'ngComponentRouter', 'ngIdle', 'smart-table']);
angular.module('app').config(function($locationProvider) {
$locationProvider.html5Mode(true);
});
angular.module('app').value('$routerRootComponent', 'app');
})();
I then declare the first $routeConfig like this:
(function() {
'use strict';
angular.module('app').component('app', {
controller: 'AppController',
templateUrl: 'app.html',
$routeConfig: [
{path: '/user/login', name: 'Login', component: 'login', useAsDefault: true},
{path: '/admin/...', name: 'Admin', component: 'admin'}
]
});
})();
The above worked fine in Angular 1.5.0 but with Angular 1.5.2 I get this error:
Failed to instantiate module app due to:
TypeError: Cannot create property '$routeConfig' on string 'AppController'
at http://localhost:3000/app.js:1:24483
at p (http://localhost:3000/app.js:1:1052)
at Bc.component (http://localhost:3000/app.js:1:24434)
at d (http://localhost:3000/app.js:1:17190)
at http://localhost:3000/app.js:1:17296
at p (http://localhost:3000/app.js:1:863)
at g (http://localhost:3000/app.js:1:17091)
at db (http://localhost:3000/app.js:1:19121)
at c (http://localhost:3000/app.js:1:7768)
at xc (http://localhost:3000/app.js:1:8071
Metadata
Metadata
Assignees
Labels
No labels