2
How to filter, with Ionic and Angularjs, repeated names in my ng-repeat
? I’ve used the ui.filters
and the unique
only works when there are no routes, ie on Websites in mobile applications does not work.
On my controller I tried that:
angular.module('myApp', ['ui.filters'])
.controller("papaRoca", function($scope, Data, $location) { });
And in my view placed:
<div ng-repeat="Lista in Listas | unique:'nome'">...</div>
Can someone help me?
it would help if you put part of the code of what you’ve already done.
– Leo
Leo in my controller tried that angular.module('myapp', ['ui.Filters']) . controller("paparoca", Function($Scope, Data, $Location) { }); and in my vein put <ng-repeat = List in Lists | Unique:'name'>
– Dan100
@Dan100, add the parts of the code directly to your question, and not in the comments.
– Thiago Lunardi
@Dan100, as it is an object that is coming in
Listas
?– Thiago Lunardi
Take a look at this reply. Must have what you need.
– Thiago Lunardi
Dude, I’m using ui.Filters on a system full of routes and it’s normal.
– DiegoAugusto
Diego you use with normal Ionic ?
– Dan100
Hi, Use this plugin: https://github.com/a8m/angular-filter here you can use | Unique:'field that you want' without creating anything in the controller. ;)
– Ramos