mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-10 14:50:58 +03:00
added routing with two routes: home and player moved most of app component to main component. app component currently just manages the top toolbar
16 lines
531 B
TypeScript
16 lines
531 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { MainComponent } from './main/main.component';
|
|
import { PlayerComponent } from './player/player.component';
|
|
const routes: Routes = [
|
|
{ path: 'home', component: MainComponent },
|
|
{ path: 'player', component: PlayerComponent},
|
|
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, { useHash: true })],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|