Hello, I am passing a parameter through my route and need to retrieve records with this parameter through an ng-repeat.
$routeProvider.when("/detalhe/:placa", {
templateUrl : 'view/detalhe.html',
controller : 'detalheCtrl'
});
But I'm not able to retrieve it from my filter within ng-repeat:
<div ng-repeat="item in items | filter: {placa: ???}">
{{item.nome}}
</div>
Does anyone have any idea how I can search for it? For I have been researching and I have only found references to input search field filters.
This is my controller:
angular.module("myApp").controller("detalheCtrl", function($scope, $http, estoqueAPI) {
$scope.loading = true;
var carregarEstoque = function () {
estoqueAPI.getEstoque()
.success(function (data) {
$scope.carros = data;
}).finally(function() { $scope.loading = false; })
};
carregarEstoque();
});