Created
June 5, 2019 16:15
-
-
Save amr-swalha/64227df5ed4f556935d479ec8f8f9602 to your computer and use it in GitHub Desktop.
app.module.ts
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 { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { FormsModule } from '@angular/forms'; | |
import { HttpClientModule } from '@angular/common/http'; | |
import { RouterModule } from '@angular/router'; | |
import { AppComponent } from './app.component'; | |
import { NavMenuComponent } from './nav-menu/nav-menu.component'; | |
import { HomeComponent } from './home/home.component'; | |
import { CounterComponent } from './counter/counter.component'; | |
import { FetchDataComponent } from './fetch-data/fetch-data.component'; | |
import { MycompoComponent } from './mycompo/mycompo.component'; | |
@NgModule({ | |
declarations: [ | |
AppComponent, | |
NavMenuComponent, | |
HomeComponent, | |
CounterComponent, | |
FetchDataComponent, | |
MycompoComponent | |
], | |
imports: [ | |
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), | |
HttpClientModule, | |
FormsModule, | |
RouterModule.forRoot([ | |
{ path: '', component: HomeComponent, pathMatch: 'full' }, | |
{ path: 'counter', component: CounterComponent }, | |
{ path: 'fetch-data', component: FetchDataComponent }, | |
{ path: 'my-compo', component: MycompoComponent }, //The my compo route defination | |
]) | |
], | |
providers: [], | |
bootstrap: [AppComponent] | |
}) | |
export class AppModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment