mardi 15 septembre 2015

how to filter a list through an external checkbox that does not contain any property(object) in the list(array) [angularjs,ng-repeat]

Below is my json that i am using to display -

    {
      "id": "1",
      "image":"img/final0.jpg",
      "title": " The Basic",
      "types":[
      {
        "type":"Time Afloat"
      }
      ],
      "difficulty": "Easy",
      "cuts": "zero"
    },
 {
      "id": "2",
      "image":"img/final0.jpg",
      "title": " The Cutter",
      "types":[
      {
        "type":"distance"
      }
      ],
      "difficulty": "Easy",
      "cuts": "zero"
    }

Suppose i have a checkbox called "distance" and another called "timeafloat" how do i filter out the array based on these checkboxes ? how do i filter the above array based on these checkboxes depending on whether they are true or false




Aucun commentaire:

Enregistrer un commentaire