Guest User

Untitled

a guest
Jan 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <a [routerLink]="['./', {outlets: {'nameOutlet': ['test']}}]"> TEST </a>
  2. <router-outlet name="nameOutlet"></router-outlet>
  3.  
  4. import { Component, OnInit} from '@angular/core';
  5. import { Routes, RouterModule, Router } from '@angular/router';
  6.  
  7.  
  8. @Component({
  9. selector: 'app-temp',
  10. templateUrl: './temp.component.html'
  11. })
  12. export class TempComponent implements OnInit {
  13.  
  14. constructor(private router: Router ) {}
  15.  
  16. ngOnInit(): void {
  17. this.router.navigate(['./', {outlets: {nameOutlet: ['test']}}]);
  18. }
  19. }
Add Comment
Please, Sign In to add comment