Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a [routerLink]="['./', {outlets: {'nameOutlet': ['test']}}]"> TEST </a>
- <router-outlet name="nameOutlet"></router-outlet>
- import { Component, OnInit} from '@angular/core';
- import { Routes, RouterModule, Router } from '@angular/router';
- @Component({
- selector: 'app-temp',
- templateUrl: './temp.component.html'
- })
- export class TempComponent implements OnInit {
- constructor(private router: Router ) {}
- ngOnInit(): void {
- this.router.navigate(['./', {outlets: {nameOutlet: ['test']}}]);
- }
- }
Add Comment
Please, Sign In to add comment