Hello.
I have the following filter:
<div ng-repeat="user in users|filter:search| filter:selectedCategories| filter:selectedType| filter:selectedDate| orderBy:'+id':true| limitTo: 10">
You want to put the text "Last users" when the page loads and I want it to not appear when the user uses the filter.
Any ideas?
edit:
<div ng-app="testeApp">
<script>
var myApp = angular.module('testeApp',[]);
myApp.controller('testeController', function($scope){
$scope.users=[
{id:1, name:"Fulano", startdate:'janeiro', categories:'normal', type:'xpto'},
];
});
</script>
</div>
<form>
<input type="text" ng-model="search" class="text-input" placeholder="Nome, Cidade, País, Continente" autofocus />
<select ng-model="selectedCategories">
<option value="">-- Categoria --</option>
<option value='normal'>Normal</option>
</select>
<select class="type" ng-model="selectedType">
<option value="">-- Tipo --</option>
<option value='xpto'>xpto</option>
</select>
<select class="data" ng-model="selectedDate">
<option value="">-- Data --</option>
<option value="janeiro">janeiro</option>
<option value="fevereiro">fevereiro</option>
</select>
</form>
<h3 ng-if="!search">Últimos usuários adicionados</h3>