angular-cn/aio/src/app/app.module.ts

64 lines
2.1 KiB
TypeScript
Raw Normal View History

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { MdToolbarModule } from '@angular/material/toolbar';
import { MdButtonModule} from '@angular/material/button';
import { MdIconModule} from '@angular/material/icon';
import { MdInputModule } from '@angular/material/input';
import { MdSidenavModule } from '@angular/material/sidenav';
import { Platform } from '@angular/material/core';
// Temporary fix for MdSidenavModule issue:
// crashes with "missing first" operator when SideNav.mode is "over"
import 'rxjs/add/operator/first';
2017-02-03 02:02:23 -05:00
import { AppComponent } from 'app/app.component';
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
import { embeddedComponents, EmbeddedComponents } from 'app/embedded';
import { Logger } from 'app/shared/logger.service';
import { LocationService } from 'app/shared/location.service';
import { NavigationService } from 'app/navigation/navigation.service';
import { DocumentService } from 'app/documents/document.service';
import { TopMenuComponent } from 'app/layout/top-menu/top-menu.component';
import { NavMenuComponent } from 'app/layout/nav-menu/nav-menu.component';
import { NavItemComponent } from 'app/layout/nav-item/nav-item.component';
import { LinkDirective } from 'app/shared/link.directive';
@NgModule({
imports: [
BrowserModule,
HttpModule,
MdButtonModule,
MdIconModule,
MdInputModule,
MdToolbarModule,
MdSidenavModule
],
2017-02-03 02:02:23 -05:00
declarations: [
AppComponent,
embeddedComponents,
2017-02-03 02:02:23 -05:00
DocViewerComponent,
TopMenuComponent,
NavMenuComponent,
NavItemComponent,
LinkDirective,
2017-02-03 02:02:23 -05:00
],
providers: [
EmbeddedComponents,
Logger,
Location,
{ provide: LocationStrategy, useClass: PathLocationStrategy },
LocationService,
NavigationService,
DocumentService,
Platform
],
entryComponents: [ embeddedComponents ],
bootstrap: [AppComponent]
})
export class AppModule {
}