tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

ERROR in NouisliderModule is not an NgModule #119

Closed ramrealpage closed 7 years ago

ramrealpage commented 7 years ago

npm i --save nouislider ng2-nouislider@latest npm WARN deprecated ng2-nouislider@1.7.0: Version unsupported. Please use latest going forward. +-- ng2-nouislider@1.7.0 `-- nouislider@10.1.0

whats the latest version, after installing facing ERROR in NouisliderModule is not an NgModule 1.7.0 is the latest version., is it the problem with library supporting angular?

rojaswilmer commented 7 years ago

I am having the same problem.

lucasvst commented 7 years ago

I am having the same problem.

lucasvst commented 7 years ago

I did a workaround, declaring NouisliderComponent inside my 'proxy-module', instead importing entire NouisliderModule.

At first it worked...but is weird...

 import { CommonModule } from '@angular/common';
 import { SliderComponent } from './slider.component';

-import { NouisliderModule } from 'ng2-nouislider';
+import { NouisliderComponent } from 'ng2-nouislider';

 @NgModule({
   imports: [
     CommonModule,
-    NouisliderModule
   ],
-  declarations: [SliderComponent],
+  declarations: [SliderComponent, NouisliderComponent],
   exports: [SliderComponent],
 })
 export class SliderModule { }
erikvanappeldoorn commented 7 years ago

Version 1.7.0 is broken, a downgrade to 1.6.2 worked for me. Check: https://github.com/tb/ng2-nouislider/issues/113

donchrizz commented 7 years ago

same here, 1.6.2 worked:

npm i --save nouislider ng2-nouislider@1.6.2