This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Can a component in a sibling viewport have a child router? #229
Open
Description
Question:
If a path in an App's $routeConfig
specifies sibling components (and the html file has corresponding named viewports), then is there any way for one of the sub-components to have a Child Router (as in the CorpusController
example below)?
In app.js:
angular.module('app', ['ngNewRouter'])
.controller('AppController', ['$router', AppController]);
AppController.$routeConfig = [
{ path: '/demo', components: { left: 'toolbar', right: 'corpus'} }
];
function AppController ($router) {}
In CorpusController.js:
angular.module('app.corpus', ['ngNewRouter'])
.controller('CorpusController', ['$router', CorpusController]);
CorpusController.$routeConfig = [
{ path: '/foo', component: 'foo' },
{ path: '/bar', component: 'bar' }
];
function CorpusController ($router) {}