私は Angular 2 の初心者で、ルーティング部分について助けが必要です。http://jasonwatmore.com/post/2016/09/29/angular-2-user-registration-and-login-example-tutorialを使用しています
エラーが発生しました
エクスポートされた変数「ルーティング」は、外部モジュール「/home/frank/angular/node_modules/@angular/core/src/metadata/ng_module」からの名前「ModuleWithProviders」を持っているか、使用していますが、名前を付けることができません。
これが私のコードです
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
// used to create fake backend
import { fakeBackendProvider } from './_helpers/index';
import { MockBackend, MockConnection } from '@angular/http/testing';
import { BaseRequestOptions } from '@angular/http';
import { AppComponent } from './app.component';
import { routing } from './app.routing';
import { AlertComponent } from './_directives/index';
import { AuthGuard } from './_guards/index';
import { AlertService, AuthenticationService, UserService } from './_services/index';
import { HomeComponent } from './home/index';
import { LoginComponent } from './login/index';
import { RegisterComponent } from './register/index';
@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing
],
declarations: [
AppComponent,
AlertComponent,
HomeComponent,
LoginComponent,
RegisterComponent
],
providers: [
AuthGuard,
AlertService,
AuthenticationService,
UserService,
// providers used to create fake backend
fakeBackendProvider,
MockBackend,
BaseRequestOptions
],
bootstrap: [AppComponent]
})
export class AppModule { }
エラーに関するアイデアはありますか?また、「@angular/core」から seimport { ModuleWithProviders } を試してみました。tsconfig.js で「宣言」を true に設定し、インポートも行いました。