mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule } from '@angular/router';
|
|
import { UniversalModule } from 'angular2-universal';
|
|
import { AppComponent } from './components/app/app.component'
|
|
import { NavMenuComponent } from './components/navmenu/navmenu.component';
|
|
import { HomeComponent } from './components/home/home.component';
|
|
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
|
|
import { CounterComponent } from './components/counter/counter.component';
|
|
import { MaterializeDirective } from 'angular2-materialize';
|
|
|
|
@NgModule({
|
|
bootstrap: [ AppComponent ],
|
|
declarations: [
|
|
MaterializeDirective,
|
|
AppComponent,
|
|
NavMenuComponent,
|
|
CounterComponent,
|
|
FetchDataComponent,
|
|
HomeComponent
|
|
],
|
|
imports: [
|
|
UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too.
|
|
RouterModule.forRoot([
|
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
|
{ path: 'home', component: HomeComponent },
|
|
{ path: 'counter', component: CounterComponent },
|
|
{ path: 'fetch-data', component: FetchDataComponent },
|
|
{ path: '**', redirectTo: 'home' }
|
|
])
|
|
]
|
|
})
|
|
export class AppModule {
|
|
}
|