NG-Select Opinions

jwp

John Peters

Posted on May 29, 2020

NG-Select Opinions

Ng-Select is an open source project, it is not a part of Angular.io, but could be mistaken to be a part of Angular.

For native Angular select support, use material's mat-select component instead.

Options

The ng-select component can do everything under the sun. Sometimes it shines, other times it's cloudy.

The shiny parts are that for simple list it's great, fast and easy to use.

Complex object bindings needing labels and options templates are difficult.

Binding

For example, you want a person's first-name and last-name to appear in the drop-down box. This simple thing requires templates. Once templates are used, the default filters don't work. Instead you must create your own filters. Not well documented at all.

To debug, you'll need to single step into the JavaScript of the tool, which is quite long and tedious to do.

Summary

Next time I need a Select Angular control, I'll skip the ng-select and head over to the mat-select instead.

💖 💪 🙅 🚩
jwp
John Peters

Posted on May 29, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

NG-Select Opinions
ngselect NG-Select Opinions

May 29, 2020

ng-select Filtering Internals!
ngselect ng-select Filtering Internals!

May 26, 2020

Javascript ng-select Internals
angular Javascript ng-select Internals

May 22, 2020