You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I add that library, my app cannot compile:
ERROR in node_modules/@ng-select/ng-option-highlight/lib/ng-option-highlight.directive.d.ts(13,17):
error TS1086: An accessor cannot be declared in an ambient context.
Looking through the changelog history, I see this readme change:
My app builds.
Both modules are imported in my AppModule.
But when I try to use the directive it crashes the app:
Error: Template parse errors:
Can't bind to 'ngOptionHighlight' since it isn't a known property of
Does nobody use the highlight?
Surely I cannot be the only person on Angular 8 where this happens. The only google hit takes me to the original closed issue which says to use the separate package, which appears to not work.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆
@rmcsharry
I faced this issue just recently. I am using "@ng-select/ng-select": "^8.1.1".
Got the same error initially. But I was importing the NgOptionHighlightModule at wrong place.
Import this module where your component is declared. Like if your component is declared in create.module.ts file then import NgOptionHighlightModule at the same module.
On Angular 8, ng-select throws this error using the [ngOptionHighlight] directive.
It was already reported and closed here.
However, when I add that library, my app cannot compile:
Looking through the changelog history, I see this readme change:
v3.0.3...v3.0.4
I am using ng-select 3.7.3 with Angular 8. So it would appear that this is a breaking change, but it's not listed as such in the changelog.
It seems that to use the new separate package, one has to be on Angular 9. I cannot upgrade yet due to other dependencies.
I tried to downgraded to v3.0.3, and 3.0.2 and 3.0.1, and 3.0.0 but still get the error:
I can see in the commits for v3.0.0 that the new package was added:
So it seems I need to use this separate package for Angular 8, yet it doesn't let me compile my app?
output of ng version:
The text was updated successfully, but these errors were encountered: