loading...

NG-Select Opinions

jwp profile image John Peters ・1 min read

ng-select (4 Part Series)

1) The ng-select HTML Template 2) The ng-select Javascript 3) ng-select Filtering Internals! 4) 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.

ng-select (4 Part Series)

1) The ng-select HTML Template 2) The ng-select Javascript 3) ng-select Filtering Internals! 4) NG-Select Opinions

Posted on by:

jwp profile

John Peters

@jwp

Angular, React, Typescript and JavaScript. The wave of now! Ok Vue too!

Discussion

markdown guide