1
1
import {
2
2
NgModule ,
3
- ErrorHandler ,
4
3
Injectable ,
5
- ApplicationRef ,
6
- Provider ,
4
+ ApplicationRef , < % if ( filters . ts || filters . flow ) { % >
5
+ Provider , < % } % >
7
6
} from '@angular/core' ;
8
7
import { BrowserModule } from '@angular/platform-browser' ;
9
8
import {
10
9
Http ,
11
10
HttpModule ,
12
- BaseRequestOptions ,
11
+ BaseRequestOptions , < % if ( filters . ts || filters . flow ) { % >
13
12
RequestOptions ,
14
- RequestOptionsArgs ,
13
+ RequestOptionsArgs , < % } % >
15
14
} from '@angular/http' ;
16
15
import {
17
16
removeNgStyles ,
@@ -22,11 +21,10 @@ import {
22
21
import { UIRouterModule } from 'ui-router-ng2' ; < % } % >
23
22
< % _ if ( filters . ngroute ) { - % >
24
23
import { RouterModule, Routes } from '@angular/router' ; < % } % >
25
- import { provideAuth , AuthHttp , AuthConfig } from 'angular2-jwt';
24
+ import { AuthHttp , AuthConfig } from 'angular2-jwt';
26
25
27
26
import { AppComponent } from './app.component';
28
27
import { MainModule } from './main/main.module';
29
- // import { MainComponent } from './main/main.component';
30
28
import { DirectivesModule } from '../components/directives.module';
31
29
import { AccountModule } from './account/account.module';
32
30
import { AdminModule } from './admin/admin.module';
@@ -50,7 +48,7 @@ let providers: Provider[] = [{
50
48
if(constants.env === 'development') {
51
49
@Injectable ( )
52
50
class HttpOptions extends BaseRequestOptions {
53
- merge ( options /*: RequestOptionsArgs*/ ) /* :RequestOptions*/ {
51
+ merge ( options : RequestOptionsArgs ) :RequestOptions {
54
52
options . url = `http://localhost:9000${ options . url } ` ;
55
53
return super . merge ( options ) ;
56
54
}
@@ -59,20 +57,10 @@ if(constants.env === 'development') {
59
57
providers . push ( { provide : RequestOptions , useClass : HttpOptions } ) ;
60
58
}
61
59
62
- const appRoutes: Routes = [
63
- //{ path : 'crisis-center' , component : CrisisListComponent } ,
64
- //{ path : 'hero/:id' , component : HeroDetailComponent } ,
65
- // {
66
- // path: 'home',
67
- // component: MainComponent,
68
- // data: { title: 'Home' }
69
- // },
70
- { path : '' ,
71
- redirectTo : '/home' ,
72
- pathMatch : 'full'
73
- } ,
74
- //{ path: '**', component: PageNotFoundComponent }
75
- ] ;
60
+ const appRoutes: Routes = [{ path : '' ,
61
+ redirectTo : '/home' ,
62
+ pathMatch : 'full'
63
+ } ];
76
64
77
65
@NgModule({
78
66
providers ,
@@ -110,8 +98,8 @@ export class AppModule {
110
98
}
111
99
// change detection
112
100
this.appRef.tick();
113
- delete store. state;
114
- delete store. restoreInputValues;
101
+ Reflect.deleteProperty(store, ' state') ;
102
+ Reflect.deleteProperty(store, ' restoreInputValues') ;
115
103
}
116
104
117
105
hmrOnDestroy ( store ) {
@@ -131,7 +119,7 @@ export class AppModule {
131
119
hmrAfterDestroy(store) {
132
120
// display new elements
133
121
store . disposeOldHosts ( )
134
- delete store . disposeOldHosts ;
122
+ Reflect . deleteProperty ( store , ' disposeOldHosts' ) ;
135
123
// anything you need done the component is removed
136
124
}
137
125
}
0 commit comments