import { NgModule } from '@angular/core' ; import { RouterModule , Routes } from '@angular/router' ; import { PlayerComponent } from './pages/player/player.component' ; import { ProfileComponent } from './pages/profile/profile.component' ; const routes = [ { path : '' , component : PlayerComponent } , { path : 'profile' , component : ProfileComponent } , { path : '**' , redirectTo : '' } ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes ) ] , exports : [ RouterModule ] , } ) export class AppRoutingModule { }