This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Loading only specified components #207
Open
Description
When building an app with two viewports like
<div ng-viewport="nav"></div>
<div ng-viewport="content"></div>
and having a $router
configuration like this
$router.config([
{ path: '/', components: {'nav' : 'navigation', 'content' : 'splash' },
{ path: '/users', components: {'content': 'users'}
]);
will end up in an exception because the new rounter doesn't find a definition for the content
viewport in my route config.
I know that's possible to configure another route within the navigation
but I'd like to keep it clean. and place all the route configurations in the AppController
itself.
Providing a router config like
$router.config([
{ path: '/', components: {'nav' : 'navigation', 'content' : 'splash' },
{ path: '/users', components: {'nav' : 'navigation', 'content': 'users'}
]);
works of course, but with this solution the content of nav
will be reloaded. Is there any way to either update only specified viewports
or to prevent a viewport
from beeing re-initialized when the same component will be injected?