Senior Principal Software Engineer @ Secureworks
Angular, Human Computer Interaction, Design
Outdoors, Crafting, Dark Chocolates, Disney
Introduced at the end of beta phase of Angular.
Introduced at the end of beta phase of Angular.
Also known as named routes - because they always have a "name" associated with them to identify them.
There is no documentation available about these on the angular docs site :=)
Introduced at the end of beta phase of Angular.
Also known as named routes - because they always have a "name" associated with them to identify them.
<header>
<h1>{{title}}</h1>
</header>
<nav>
<a routerLink="/dashboard">Dashboard</a>
<a routerLink="/store">Products</a>
</nav>
<main>
<router-outlet></router-outlet>
</main>
<footer>
<app-footer></app-footer>
</footer>
# PRESENTING CODE
const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'store', component: StoreComponent },
{ path: 'product-detail/:id',
component: ProductDetailComponent }
];
# PRESENTING CODE
const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'store', component: StoreComponent },
{ path: 'product-detail/:id',
component: ProductDetailComponent },
{
path: 'cart',
outlet: 'details',
component: CartComponent
},
];
# PRESENTING CODE
<header>
<h1>{{title}}</h1>
</header>
<nav>
<a routerLink="/dashboard">Dashboard</a>
<a routerLink="/store">Products</a>
</nav>
<main>
<router-outlet></router-outlet>
</main>
<aside>
<router-outlet name=details></router-outlet>
</aside>
<footer>
<app-footer></app-footer>
</footer>
| Main Route | Auxiliary Route | Brower URL |
|---|---|---|
| /dashboard | /cart | /dashboard(details:cart) |
| /store | /cart | /store(details:cart) |
| /product-detail:id | /cart | /product-detail:id(details:cart) |
Help / Documentation Guides
Side drawers or panels with details - easy to share the current view
Comparison modes and saved listings
Any scenario that requires the ability to load a view within another view for easy sharing, or to load a component independently of the route across all routes.
@GuacamoleAnkita
Github repo:
Slides: