app.ts 2.22 KB
Newer Older
1
2
3
4
import 'reflect-metadata';
import 'babel-polyfill';
import 'core-js/es6';
import 'core-js/es7/reflect';
5
import { NgModule } from '@angular/core';
6
import { NgReduxModule, DevToolsExtension, NgRedux } from 'ng2-redux';
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import {BrowserModule} from '@angular/platform-browser';
import {
  FormsModule,
  ReactiveFormsModule,
} from '@angular/forms';

import {RouterModule} from '@angular/router';
import { HttpModule } from '@angular/http';
import {
  APP_BASE_HREF,
  HashLocationStrategy,
  LocationStrategy,
  NgLocalization,
} from '@angular/common';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import Main from './containers/main';
import { APP_ROUTER_PROVIDERS, APP_DECLARATIONS } from './app.routes';

/* Here we import services */
28
import {HelperDataService} from './services/helper-data-service';
29
import {UserDataService} from './services/user-data-service';
Open Source Developer's avatar
Open Source Developer committed
30
31
import {AmkaCheckService} from './services/amkacheck-service';

32

33
import { ACTION_PROVIDERS } from './actions';
34
35
import Home from './components/home';
import { Ng2SmartTableModule } from 'ng2-smart-table';
Open Source Developer's avatar
Open Source Developer committed
36
37


38

39
40
41
42
43
44
import HeaderComponent from './components/header/header.component';
import NavbarComponent from './components/navbar/navbar.component';
import MainComponent from './components/main/main.component';
import FooterComponent from './components/footer/footer.component';


45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class MyLocalization extends NgLocalization {
   getPluralCategory(value: any) {
      if (value < 5) {
         return 'few';
      }
   }
}

@NgModule({
  imports:      [
    BrowserModule,
    FormsModule,
    RouterModule,
    ReactiveFormsModule,
    APP_ROUTER_PROVIDERS,
    HttpModule,
62
    Ng2SmartTableModule,
Open Source Developer's avatar
Open Source Developer committed
63
64
    NgReduxModule,

65
66
  ],
  declarations: [
67
    Main, FooterComponent, HeaderComponent, NavbarComponent, MainComponent,
68
69
70
71
72
73
74
    APP_DECLARATIONS,
  ],
  bootstrap: [ Main ],
  providers: [
    { provide: APP_BASE_HREF, useValue: '/' },
    { provide: LocationStrategy, useClass: HashLocationStrategy },
    { provide: NgLocalization, useClass: MyLocalization },
75
76
    DevToolsExtension,
    ACTION_PROVIDERS,
77
//    Service1, again services here
78
    HelperDataService,
79
    UserDataService,
Open Source Developer's avatar
Open Source Developer committed
80
    AmkaCheckService,
81
82
83
84
85
  ]
})
class AppModule {}

platformBrowserDynamic().bootstrapModule(AppModule);