Skip to content

Instantly share code, notes, and snippets.

@CharlieGreenman
Created June 13, 2019 23:54
Show Gist options
  • Save CharlieGreenman/7acf322038c36d874ecc44910caede28 to your computer and use it in GitHub Desktop.
Save CharlieGreenman/7acf322038c36d874ecc44910caede28 to your computer and use it in GitHub Desktop.
Example of an Angular router.
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