C
C
Cyber_bober2017-03-02 09:25:59
Angular
Cyber_bober, 2017-03-02 09:25:59

Why is filter not working in angularjs?

Hello, I can't figure out why the filter in angularjs doesn't work
Filter is called on click

<span ng-click="typeFilter = {type:4}">Летние виды спорта</span>

Filtration
<div class="items" ng-repeat="object in $ctrl.objects |filter: typeFilter ">

Initial value
$scope.typeFilter={};
The value of typeFilter changes, but no output occurs.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GTRxShock, 2017-03-02
@Cyber_bober

yes everything is ok: https://plnkr.co/edit/oLfb2OMKOgCzwtblFcTz?p=preview
you can start searching with $ctrl.objects

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question