U
U
Uncle Deacon2017-08-04 13:46:11
Angular
Uncle Deacon, 2017-08-04 13:46:11

How to get to a property in a filter in a dotted way?

Good afternoon everyone. Hung up the model and the filter.
I hung the model on the input, let's say I hung the filter<input ng-model="paragraph">

<div ng-repeat="article in articles.values | filter:{article:paragraph}">
<!--Контент-->
</div>

The question is, how do I get to the property in json with the dot method in the filter? I can't get directly to the title property because it's in the article property.
This is how he swears
<div ng-repeat="article in articles.values | filter:{article.title:paragraph}"></div>

Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0X12eb, 2017-08-06
@0X12eb

There are three solutions:
In this case, of course, the first option is better than the others.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question