Created
June 13, 2019 23:54
-
-
Save CharlieGreenman/7acf322038c36d874ecc44910caede28 to your computer and use it in GitHub Desktop.
Example of an Angular router.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { RouterModule } from '@angular/router'; | |
import { AppComponent } from './app.component'; | |
@NgModule({ | |
imports: [ | |
RouterModule.forRoot( [ | |
{ | |
path: '', | |
component: AppComponent | |
}, | |
{ | |
path: 'draw', | |
component: PxGridComponent | |
}, | |
{ | |
path: '**', | |
component: PageNotFoundComponent | |
} | |
], { initialNavigation: 'enabled' }) | |
], | |
}) | |
export class PixelAngstAppRoutingModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment