AngularJS orderby with empty field

How about this for sorting strings:

item in (items|orderBy:['!name', 'name'])

The advantage (apart from being more concise) is it sorts null & undefined with the blank strings.

In my case I wanted the blanks & nulls & undefineds together at the top (nulls and undefineds by default sort to the bottom), so I used:

item in (items|orderBy:['!!name', 'name'])

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)