Change the filter properties according the selection in Ionic

I use this plugin in Angular to Filters: And that perfect to it.

Well, I have to create many filters. I intent create a View with checkboxes, like:


	<form class="list" ng-submit="">			
		<ion-radio ng-model="sortby" ng-value="'n'" >Nome</ion-radio>
		<ion-radio ng-model="sortby" ng-value="'plh'" >Preço (Menor-Maior)</ion-radio>
		<ion-radio ng-model="sortby" ng-value="'phl'" >Preço (Maior-Menor)</ion-radio>
	 <div class="list box">
		<button class="button button-block button-calm" type="submit">Aplicar</button>


And conform the option selected, change the filter in the original View. But, How I can do it?

If you put your filter in a different view than the one i which you atually want your data to be filtered, you have to pass your filter value from one view to the other, with parameters for exemple.

If you wonder how to get your filter to work, just use

<li ng-repeat="item in itemsFromYourList | filter:{item.value:sortby}">

Tell me if this answers in any way to your problem.

Yes, but the item.value have to be dinamic.

My ng-repeat=“item in ofertass | filter:q as results” I want change the filter according user selected in another view or modal…

you can do it like this, to filter different fields with different input for instance :

ng-repeat="item in itemsList | filter:{, item.description:myDescriptionFilter, ...}"