我正在使用ionic2
+Angular2
并已安装"angular2-moment": "^1.0.0-beta.6"
. 导入后出现以下错误
错误:
捆绑更新失败:node_modules\angular2-moment\index.js 未导出“MomentModule”
(由 src\app\app.module.ts 导入)。有关修复此错误的帮助,请参阅 https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
代码:
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { CommonModule } from '@angular/common';
import { MyApp } from './app.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MomentModule } from "angular2-moment";
@NgModule({
declarations: [
LoginPage,
TabsPage,
ReversePipe
],
imports: [
IonicModule.forRoot(MyApp),
FormsModule,
ReactiveFormsModule,
BrowserModule,
MomentModule,
CommonModule,
HttpModule
],
bootstrap: [IonicApp],
entryComponents: [
LoginPage,
TabsPage
],
providers: [ myApi ]
})
export class AppModule {}
关于如何安装MomentModule
的任何帮助ionic2
?