Hello,
I am using angular 2.0.1 and have imported the module.
can someone help?
thanks
I've faced with the same problem. After reading some other issues, I made some corrections in my code:
import { SelectModule } from 'ng2-select';
@NgModule({
imports: [ SelectModule ]
})
<ng-select [active]="yourActiveItems" ...></ng-select>I'm having the same exact issue as well. Does anyone have a working sample angular 2 project with this?
@shima20 if you are lazy loading modules. you have to import it on lazy loaded module
@k1ng440 what exactly do you mean? do you have an example? I don't believe I'm lazy loading.
You have to import the forms module into your component module because [(ngModel)] requires it:
import { FormsModule } from '@angular/forms';
imports: [FormsModule],
I have exactly the same problem.
Does anyone have actual working Angular 2 example with this library?
https://angular.io/docs/ts/latest/guide/ngmodule.html#!#shared-module
I am also facing same problem.
please help anyone...
[1]
npm install --save @ng-select/ng-select
[2] app.module.ts -
import { NgSelectModule } from '@ng-select/ng-select';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [AppComponent],
imports: [NgSelectModule, FormsModule],
bootstrap: [AppComponent]
})
export class AppModule {}
[3] Include in style.scss -
@import "~@ng-select/ng-select/themes/default.theme.css";
// ... or
@import "~@ng-select/ng-select/themes/material.theme.css";
Reference - https://github.com/ng-select/ng-select
Most helpful comment
I've faced with the same problem. After reading some other issues, I made some corrections in my code:
<ng-select [active]="yourActiveItems" ...></ng-select>