0
<div ng-repeat="column in columns">
<div ng-if="column.new">
{{ contador = contador + 1 }}
<span ng-if="contador === 1">
<div class="alert alert-danger">TESTDASDALGO</div>
</span>
<span ng-if="contador > 1">
{{ contador = 0 }}
</span>
</div>
</div>
Values are being printed between colchetes
.
Another doubt:
- Should logic be done at the front? I have a lot of conditional stuff in my project, it will probably get very confusing... (There is another way to do)?
It is possible to do something similar to what I wrote below?
var contador = 0;
angular.forEach($scope.columns, function(column){
if(column.new){
contador++;
if(contador === 1){
include('umarquivo.html');
}
if(contador > 1){
'</div>'; //fechar uma div
contador = 0;
}
}
});