Check out example codes for "set default route angular". It will help you in understanding the concepts better.

Code Example 1

// Place import at the top
import { Router,NavigationStart} from '@angular/router';

//Place the code below inside your class
constructor(private router: Router){}

ngOnInit(){ =>{
      if (event instanceof NavigationStart){

Code Example 2

import {Router} from '@angular/router'; // import router from angular router

export class Component{ 				// Example component.. 
	constructor(private route:Router){} 
		this.route.navigate(['/page']); // navigate to other page

Code Example 3

{path:'',redirectTo:'login', pathMatch: 'full' },

Learn ReactJs, React Native from