Мой фильтр:
iApp.filter('filtermaterials', function () {
return function (doors, wood, plastic) {
if(doors == null) return;
var filteredMaterials = [];
if (wood === undefined){
wood = "";
}if (plastic === undefined){
plastic = "";
}
if (wood === "" && plastic === ""){
wood = "Дерево";
plastic = "Пластик";
}
for (var i = 0; i < doors.length; i++) {
if (String(doors[i]['type']) === String(wood)) {
filteredMaterials.push(doors[i]);
}
if (String(doors[i]['type']) === String(plastic)){
filteredMaterials.push(doors[i]);
}
}
return filteredMaterials;
};
});
Как можно вытащить значение вне блока цикла
<div class="mybodydivright2" align="center" ng-repeat="door in doors | filtermaterials:wood:plastic | filtercompani:one:two | filterprice:price1:price2 | orderBy:price">
{% verbatim %}
{{door.name}}<br>
<img src={{door.img}} width="150" height="200"><br>
Фирма: {{door.star}}<br>
Материал: {{door.type}}<br>
Цена: {{door.price}}
{% endverbatim %}
</div>
Заранее спасибо