ngx-bootstrap: Error with new angular RC5
Getting this error when angular app starting
Error: Error: Error: Input 'previousText' defined multiple times in 'PagerComponent'
at new BaseException (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:5116:27)
at eval (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:12845:31)
at Array.forEach (native)
at DirectiveResolver._merge (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:12842:24)
at DirectiveResolver._mergeWithPropertyMetadata (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:12834:25)
at DirectiveResolver.resolve (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:12786:33)
at CompileMetadataResolver.getDirectiveMetadata (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:13097:55)
at addDirective (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:13367:37)
at eval (http://localhost:8000/node_modules/@angular/compiler//bundles/compiler.umd.js:13376:77)
at Array.forEach (native)
Evaluating http://localhost:8000/app/main.js
Error loading http://localhost:8000/app/main.js
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 22
- Comments: 36 (12 by maintainers)
This is what I get trying to compile my project with RC5:
We need
@NgModulesupport to use the directives.The root cause is that ng2-bootstrap needs to add NgModule support so that it can be added to the imports section of the application module.
However, until that happens, a workaround is to add ng2-bootstrap components and directives to the declarations section of the root application module, and removing the ng2-bootstrap declarations from the application’s Component decorators.
Unfortunately, any attempt to introduce NgModule feature modules to the application will break this workaround.
I’ll give it a shot, thanks!
I can confirm that stopping the mangling of the code with the UglifyPlugin I use in Webpack solves the problem.
@achimha @marcalj Is there already any solution for that problem? Because I suffer the same error as @achimha does:
where as-my-battery has a
@Input() level: number;declaration in his class