Cant upgrade angular and other angular rc6 based modules due to this :-
Peer [email protected] wants @angular/common@^2.0.0-rc.1
would it be possible to upgrade ng2-select too ?
Edit :- Since Angular 2.0.0 is out , and other modules are already being updated.
I just found these forks which have updated to rc6 already
https://github.com/aslubsky/ng2-select/commit/2b940a2f0b6be021d58d9690ec35654ed7b63d7e
https://github.com/chymz/ng2-select/commit/e35184a12e91a1f74676c6af0de7f24e470de37d
Try your luck :D
Thanks ! That would help for time being :+1:
I have used the link to aslubsky and it works. However, I could not get it to work for the angular compiler to bootstrap with ahead-of-time compilation
Is there an example of how to load by NgModule? or just we need to add in NgModule.declarations importing SelectComponent ?
besides SelectComponent there is OffClickDirective and HighlightPipe. However, even adding them to NgModule.declarations there is an error because SelectComponent defines directives which is illegal with NgModule in RC6.
Waiting for RC6 version, hope the forks will be published soon to npm..
@Namek
Changing the directives: ... stuff to the ngModule shouldn't be the problem =)
I'm curious if anyone already have a working version.
I have used the link to aslubsky's fork, and like lacma2011, I found that AoT doesn't work. I also found that if you have multiple ng-selects on a page, when you click on one it opens all of them.
It appears that the AoT issue can be fixed by moving the template in select/select.ts into a HTM file and use templateUrl instead of template for @Component:
@Component({
selector: 'ng-select',
templateUrl: 'select.html'
})
Even the *.metadata.json-files need to be generated for aot-compilation, regarding this issue in ng2-bootstrap https://github.com/valor-software/ng2-bootstrap/issues/933
Most helpful comment
I just found these forks which have updated to rc6 already
https://github.com/aslubsky/ng2-select/commit/2b940a2f0b6be021d58d9690ec35654ed7b63d7e
https://github.com/chymz/ng2-select/commit/e35184a12e91a1f74676c6af0de7f24e470de37d
Try your luck :D