我正在尝试从'ng2-opd-popup'导入'PopupModule'模块到我的应用程序 . Webpack编译得很好,但我在浏览器中收到此错误并且没有任何加载:
在App.module.ts文件中我试图添加:
import { PopupModule } from 'ng2-opd-popup';
@NgModule({
declarations: [ ],
imports: [
PopupModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
如果我删除此模块,那么一切正常 .
我正在使用角4 .
Versions :
-
@ angular / cli:1.4.5
-
node:6.9.1
-
os:win32 x64
-
@ angular / common:4.4.6
-
@ angular / compiler:4.4.6
-
@ angular / core:4.4.6
-
@ angular / cli:1.4.5
-
@ angular / compiler-cli:4.4.6
-
打字稿:2.3.4
有任何想法吗?
2 回答
I have also face this issue , I have tried to work with downgraded option but still I was not able to work in shared module .
I have install other package and it works
https://www.npmjs.com/package/ng2-modal
转到node-modules文件夹中的
ng2-opd-popup
文件夹内部并删除其中的node_modules文件夹(在ng2-opd-popup
文件夹中) . 它不是必需的 . 我也遇到过这个问题,所以它没有文件夹 .