Heading
Hello, I have this $scope array with objects in my Angular.js controller:
$scope.recipes = [
{
name :"Ceasar Salad",
ingredients:["chicken","lettuce"],
time:"8'"
},
{
name :"Lupus Salad",
ingredients:["lupus","lettuce"],
time:"18'"
}
]
Then I repeat ech object in $scope.recipe
ul(ng-repeat="r in recipes | filter:ingredient")
li
h3{{r.name}}
i(class="fa fa-clock-o")
span{{r.time}}
i(ng-class="heart" ng-click="change()")
And use this input with ng-model to filter in my ng-repeat
input(type="text" ng-model="ingredient")
The question is. How can I filter only words that are in each "ingredients" property of each object.
thanks.