valor-software / ng2-select

Angular based replacement for select boxes
http://valor-software.github.io/ng2-select/
MIT License
675 stars 587 forks source link

ng2-select not working after upgrade to Angular 8 #983

Open kunalgarg19 opened 5 years ago

kunalgarg19 commented 5 years ago

Hi

I have upgraded the angular version from 2 to 8 in my project. The ng2-select has stopped working after the upgrade and it just hangs the page once I access the component where ng2-select is used. I have even tried ng2-select-compat, but I am getting the same issue. Can you please help me on this?

Thanks

thepaulstory commented 5 years ago

Hi,

I am merging two apps Angular 5 and Angular 8. I added the modules from the Angular 5 app into the Angular 8 app. The Angular 5 app was using ng2-select. Those select components still function in Angular 8.1. I'm having css issues, but the components are working.

You might want to confirm that you are importing the SelectModule from ng2-select in your relevant module.

Sergik666 commented 5 years ago

ERROR in node_modules/ng2-select/select/select.d.ts.SelectComponent.html(20,129): Property 'removeClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(12,11): Property 'matchClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(37,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(41,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(38,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(39,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(58,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(55,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(60,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(56,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(57,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(9,10): Property 'inputMode' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(30,12): Property 'inputMode' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(33,10): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(47,11): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(4,6): Property 'mainClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(82,19): Property 'removeClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(104,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(108,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(105,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(106,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(125,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(122,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(127,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(123,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(124,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(100,10): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(114,11): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(69,6): Property 'mainClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(70,6): Property 'focusToInput' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(90,12): Property 'matchClick' is protected and only accessible within class 'SelectComponent' and its subclasses.

thepaulstory commented 5 years ago

thumbs up emoji very useful post I like how you included the version of the ng-select control you're using and the version, major/minor of Angular you are using

viktrus commented 5 years ago

ERROR in node_modules/ng2-select/select/select.d.ts.SelectComponent.html(20,129): Property 'removeClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(12,11): Property 'matchClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(37,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(41,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(38,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(39,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(58,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(55,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(60,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(56,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(57,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(9,10): Property 'inputMode' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(30,12): Property 'inputMode' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(33,10): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(47,11): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(4,6): Property 'mainClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(82,19): Property 'removeClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(104,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(108,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(105,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(106,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(125,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(122,16): Property 'isActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(127,20): Property 'inputValue' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(123,16): Property 'selectActive' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(124,16): Property 'selectMatch' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(100,10): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(114,11): Property 'optionsOpened' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(69,6): Property 'mainClick' is protected and only accessible within class 'SelectComponent' and its subclasses. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(70,6): Property 'focusToInput' is private and only accessible within class 'SelectComponent'. node_modules/ng2-select/select/select.d.ts.SelectComponent.html(90,12): Property 'matchClick' is protected and only accessible within class 'SelectComponent' and its subclasses.

same problem here

thepaulstory commented 5 years ago

I would bet this has something to do with fullTemplateTypeCheck being turned on, not so much Angular 8

dphochman commented 5 years ago

Setting fullTemplateTypeCheck to false in our app's tsconfig.json file solved this problem for us, while we were upgrading from Angular 7 to Angular 8. Thank you for the suggestion.

sidp45 commented 5 months ago

ng2-select is not supported in angular version 12.please provide alternet solution or how to resolve this problem.