Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import './vendor.ts';
- import { NgModule, Injector } from '@angular/core';
- import { BrowserModule } from '@angular/platform-browser';
- import { HTTP_INTERCEPTORS } from '@angular/common/http';
- import { NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
- import { Ng2Webstorage, LocalStorageService, SessionStorageService } from 'ngx-webstorage';
- import { JhiEventManager } from 'ng-jhipster';
- import { AuthInterceptor } from './blocks/interceptor/auth.interceptor';
- import { AuthExpiredInterceptor } from './blocks/interceptor/auth-expired.interceptor';
- import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor';
- import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor';
- import { HasuSiteSharedModule } from 'app/shared';
- import { HasuSiteCoreModule } from 'app/core';
- import { HasuSiteAppRoutingModule } from './app-routing.module';
- import { HasuSiteHomeModule } from './home/home.module';
- import { HasuSiteAccountModule } from './account/account.module';
- import { HasuSiteEntityModule } from './entities/entity.module';
- import * as moment from 'moment';
- // jhipster-needle-angular-add-module-import JHipster will add new module here
- import { HasuMainComponent, NavbarComponent, FooterComponent, PageRibbonComponent, ActiveMenuDirective, ErrorComponent } from './layouts';
- import { FormComponent } from './form/form.component';
- import { NewComponentComponent } from './new-component/new-component.component';
- @NgModule({
- imports: [
- BrowserModule,
- HasuSiteAppRoutingModule,
- Ng2Webstorage.forRoot({ prefix: 'hasu', separator: '-' }),
- HasuSiteSharedModule,
- HasuSiteCoreModule,
- HasuSiteHomeModule,
- HasuSiteAccountModule,
- // jhipster-needle-angular-add-module JHipster will add new module here
- HasuSiteEntityModule
- ],
- declarations: [
- HasuMainComponent,
- NavbarComponent,
- ErrorComponent,
- PageRibbonComponent,
- ActiveMenuDirective,
- FooterComponent,
- FormComponent,
- NewComponentComponent
- ],
- providers: [
- {
- provide: HTTP_INTERCEPTORS,
- useClass: AuthInterceptor,
- multi: true,
- deps: [LocalStorageService, SessionStorageService]
- },
- {
- provide: HTTP_INTERCEPTORS,
- useClass: AuthExpiredInterceptor,
- multi: true,
- deps: [Injector]
- },
- {
- provide: HTTP_INTERCEPTORS,
- useClass: ErrorHandlerInterceptor,
- multi: true,
- deps: [JhiEventManager]
- },
- {
- provide: HTTP_INTERCEPTORS,
- useClass: NotificationInterceptor,
- multi: true,
- deps: [Injector]
- }
- ],
- bootstrap: [HasuMainComponent]
- })
- export class HasuSiteAppModule {
- constructor(private dpConfig: NgbDatepickerConfig) {
- this.dpConfig.minDate = { year: moment().year() - 100, month: 1, day: 1 };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement