forked from ui-router/sample-app-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.module.ts
36 lines (34 loc) · 1015 Bytes
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MainComponent } from './main.component';
import { AppComponent } from './app.component';
import { WelcomeComponent } from './welcome.component';
import { LoginComponent } from './login.component';
import { HomeComponent } from './home.component';
import { UIRouterModule } from '@uirouter/angular';
import { APP_STATES } from './app.states';
import { GlobalModule } from './global/global.module';
import { routerConfigFn } from './router.config';
@NgModule({
declarations: [
MainComponent,
AppComponent,
WelcomeComponent,
LoginComponent,
HomeComponent
],
imports: [
UIRouterModule.forRoot({
states: APP_STATES,
useHash: true,
initial: { state: 'home' },
config: routerConfigFn,
}),
GlobalModule,
BrowserModule,
FormsModule
],
bootstrap: [MainComponent]
})
export class AppModule { }