I am struggling with the following angular markup:
<tr ng-repeat="dia in dias">
<td>{{ dia[0].fecha }}</td>
<td ng-repeat="bloque in bloques">
<div ng-repeat="hora in dia|soloBloque:bloque|sacarHoras">
{{hora}}
<div ng-repeat="evento in dia|soloHora:hora">{{evento.cantidad}} {{ tipoAMedida(evento.tipo) }}</div>
</div>
</td>
</tr>
Encountering a runtime error when using the line
<div ng-repeat="hora in dia|soloBloque:bloque|sacarHoras">
in angular:
0x800a139e - JavaScript runtime error: 10 $digest() iterations reached. Aborting!
The code works fine if I remove one of the filters. The filters are chained properly according to my understanding. What could be causing this issue?
Filters used in the code:
soloBloque:
function soloProp(prop) {
return (function (prop) {
return function () {
return function (input, valor) {
return _.filter(input, function (e) { return e[prop] === valor; });
}
}
} (prop));
}
soloBloque = soloProp('bloque');
soloHora = soloProp('hora');
sacarHoras:
function sacarHoras () {
return function (input) {
return _(input).map('hora').unique();
}
}