Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from ‘@angular/core’;
- import { BrowserModule } from ‘@angular/platform-browser’;
- import { RouterModule, Routes } from ‘@angular/router’;
- import { AppComponent } from ‘./app.component’;
- import { StudentComponent } from ‘./student/student.component’;
- import { StaffComponent } from ‘./staff/staff.component’;
- const appRoutes: Routes = [
- { path: ‘student’, component: StudentComponent },
- { path: ‘staff’, component: StaffComponent },
- { path: ‘’, redirectTo: ‘/student’, pathMatch: ‘full’ },
- ];
- @NgModule({
- imports: [
- BrowserModule,
- RouterModule.forRoot(appRoutes)
- ],
- declarations: [
- AppComponent,
- StudentComponent,
- StaffComponent,
- ],
- bootstrap: [ AppComponent ]
- })
- export class AppModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement