Open denismaster opened 6 years ago
Same issue
Uncaught Error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation.
at syntaxError
Is this still relevant? there is a new version (5) that works with angular v5.
Also, make sure you are working with the supported TypeScript version for your angular version, the error you have hints that you are using a TS version not supported by angualr.
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository
Do you want to request a feature or report a bug? A bug report.
What is the current behavior? I'm trying to create a DialogService, which can open modals. I've added an Modal as dependency for my service. I've also imported a ModalModule.forRoot() and BootstrapModalModule from ngx-modialog into my AppModule. But I've got an error when building in AOT mode.
ERROR in Unexpected value 'BootstrapModalModule in C:/Users/XRM/Documents/repairPayments/micro/Xrm.Micro/Xrm.Micro/node_modules/ngx-modialog/plugins/bootstrap/src/bootstrap.module.d.ts' imported by the module 'AppModule in C:/Users/XRM/Documents/repairPayments/micro/Xrm.Micro/Xrm.Micro/ClientApp/app/app.module.ts'. Please add a @NgModule annotation.
What is the expected behavior? Everything is ok, no exceptions are thrown.
Please tell us about your environment:
Angular version: 4.3.6
Webpack: 3.x