angularjs - filtering objects based on their parameters, not values -


I can search by Jason objects on page that are shown with ng-repeat, but I can select them Be able to 'filter' with a certain parameter with the HTML element.

To better understand, it says my HTML code:

  & lt; Select ng-model "selectGroupToShow" ng-option = "group. MyGroups name for the group" & gt; & Lt; Option value = "" & gt; - Choose something - & lt; / Options & gt; & Lt; / Select & gt;   

Let's say my group's name features "Group 1, Group 2, Group 3". "|" Are there. They also indeses and have other parameters, but what I am selecting by name (this is what the user wants to see)

The object is created like this:

 < Code> {'GroupID': value, 'parameter2': value, 'parameter3': value, a ?? |} A ?? |   

Now if I use selectGroupToShow as a group, objects are filtered by group. The name that is correct, but my objects do not have a group. The name is as the value of them. They have Group ID numbers which are given as parameters in parameter group id.

Can I select any way through only groupID values? I still have to show the group. Not the name in the selection, but the group 'idid' parameter is searching as 'value in groupID'?

Once again the problems are coming to me:

  • Filter the search through the values ​​of all the objects to find only one exact parameter for a specific value
  • You usually use the input field to search (what I am also doing) but I should also be able to use some parameters (here the problem object To choose from, but for example Object ID is to be searched by)

    If I was ambiguous then please do not hesitate to ask for more information to change my problem in a difficult time understanding question.)

    %, I hope you want this.

      & lt; Select ng-model = "selectedValue" ng-option = "g.groupID as g.Name live for group" & gt; & Lt; / Select & gt; JSFDial:  

    This should select the ID for you, but they should be labeled as the user's name for selection.

    The table "ngioction" is a good reference for working with archive / array as an alternative element.

    Edit: Filter the list of groups by the new JSFiddle, specified parameter.

    Dock on filter:

    Edit # 2: User Bella, configured to correctly filter

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -