-
Notifications
You must be signed in to change notification settings - Fork 25
/
app.module.ts
82 lines (77 loc) · 2.63 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import {
NgbRatingModule,
NgbDropdownModule,
NgbModalModule
} from '@ng-bootstrap/ng-bootstrap';
import { NgxPaginationModule } from 'ngx-pagination';
import { SimpleNotificationsModule } from 'angular2-notifications';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { TransferHttpCacheModule } from '@nguniversal/common';
import { environment } from '../environments/environment';
import { AuthGuard } from './shared/auth.guard';
import { NavService } from './shared/nav.service';
import { UserService } from './shared/user.service';
import { AppComponent } from './app.component';
import { NavbarComponent } from './navbar/navbar.component';
import { routes } from './app.routes';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
import { HomeComponent } from './home/home.component';
import { ProductComponent } from './product/product.component';
import { CartComponent } from './cart/cart.component';
import { CheckoutComponent } from './checkout/checkout.component';
import { OrdersComponent } from './orders/orders.component';
import { ProfileComponent } from './profile/profile.component';
import { LoginComponent } from './login/login.component';
import { AddNewComponent } from './add-new/add-new.component';
import { GroupByPipe } from './orders/groupby.pipe';
import { EllipsisPipe } from './home/ellipsis.pipe';
@NgModule({
declarations: [
NavbarComponent,
AppComponent,
PageNotFoundComponent,
HomeComponent,
ProductComponent,
CartComponent,
CheckoutComponent,
OrdersComponent,
ProfileComponent,
GroupByPipe,
EllipsisPipe,
LoginComponent,
AddNewComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'amazon' }),
HttpClientModule,
TransferHttpCacheModule,
CommonModule,
FormsModule,
RouterModule.forRoot(routes),
HttpClientJsonpModule,
NgbRatingModule,
NgbDropdownModule,
NgbModalModule,
NgxPaginationModule,
SimpleNotificationsModule.forRoot(),
BrowserAnimationsModule
],
providers: [
{ provide: 'BASE_URL', useFactory: getBaseUrl },
AuthGuard,
NavService,
UserService
],
entryComponents: [AppComponent],
bootstrap: [AppComponent]
})
export class AppBrowserModule {}
export function getBaseUrl() {
return environment.API_URL;
}