filter ng-options - problems with default value

227 views
Skip to first unread message

Jonathan Price

unread,
Nov 10, 2014, 2:16:15 AM11/10/14
to ang...@googlegroups.com
Here's a simple plunk of the problem I'm trying to solve.  Seems like it should be pretty simple, but I'm not sure about the best way to do it.  Basically, there's a select that acts as a filter on a set of values.  When the select's default value of 'Select One' is selected, I want to see all of the items returned.  I'm just not sure about how best to accomplish it.  Thanks!

http://plnkr.co/edit/byN68U3jsAGg70sSyqlM?p=preview

Sander Elias

unread,
Nov 10, 2014, 10:19:24 AM11/10/14
to ang...@googlegroups.com
Hi Jonathan,

the format of the ngOptions takes a little getting used to.

Regards
Sander

Puritan Paul

unread,
Nov 10, 2014, 2:14:08 PM11/10/14
to ang...@googlegroups.com
Right.  I don’t entirely understand why that works.  When the filter value is ‘’, all values pass?

Here’s a slightly more elaborate version that’s still a problem.  Probably should’ve posted this first.  I need the ‘Select All’ option to show up in the categories select as well, where categories is filtered by the menu value.  I tried putting an ‘empty’ menu item in the ‘empty’ category, but that doesn’t seem to do it.


Thanks for the help!



--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/2Ovq7zm7hog/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages