Не получается скрестить генератор с mdList.
Генератор:
$scope.inside = [...];
var generator = function*() {
var l = Math.ceil($scope.inside.length / 3);
for (var i = 0; i < 3; i++) {
yield $scope.inside.slice(l * i, l * (i + 1));
}
};
$scope.insideDivided = generator();
Шаблон:
<md-list flex ng-repeat="column in [1,2,3]">
<md-list-item ng-click="log(button.url)" ng-repeat="button in insideDivided.next().value">
{{log(button)}}
{{button.title}}
</md-list-item>
</md-list>
Совершенно честно пишет в консоль {{log(button)}}
Object {title: "Скорости закрытия сообщений", url: "/inside/fake.html", $$hashKey: "object:13"} root.js:100
Object {title: "Наиболее спамящие ноды", url: "/inside/fake.html", $$hashKey: "object:14"} root.js:100
Object {title: "Неиспользуемые политики", url: "/inside/fake.html", $$hashKey: "object:15"}
....
Но при этом создает пустые <md-list>
<!-- ngRepeat: column in [1,2,3] --><md-list flex="" ng-repeat="column in [1,2,3]" role="list" class="ng-binding ng-scope flex">
<!-- ngRepeat: button in insideDivided.next().value -->
</md-list><!-- end ngRepeat: column in [1,2,3] --><md-list flex="" ng-repeat="column in [1,2,3]" role="list" class="ng-binding ng-scope flex">
<!-- ngRepeat: button in insideDivided.next().value -->
</md-list><!-- end ngRepeat: column in [1,2,3] --><md-list flex="" ng-repeat="column in [1,2,3]" role="list" class="ng-binding ng-scope flex">
<!-- ngRepeat: button in insideDivided.next().value -->
</md-list><!-- end ngRepeat: column in [1,2,3] -->
В чем косяк? Почему цикл по md-list проходит, но сами элементы не создаются?