app.module.ts 1.04 KB
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppComponent } from './app.component';
import { ViplistComponent } from './viplist/viplist.component';
import {AlertModule} from "ng2-bootstrap";
import {MoyaRestModule} from "./moya-rest/moya-rest.module";

import { RouterModule, Routes } from '@angular/router';
import {TestComponent} from "./test/test.component";
import {MaterialModule} from "@angular/material";

const appRoutes: Routes = [
  { path: 'vip/viplist', component: ViplistComponent },
  { path: 'test', component: TestComponent }
];


@NgModule({
  declarations: [
    AppComponent,
    ViplistComponent,
    TestComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    MaterialModule.forRoot(),
    AlertModule.forRoot(),
    MoyaRestModule.forRoot() ,
    RouterModule.forRoot(appRoutes)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }