Collection-repeat ng-init directive bug?


#1

Hello, I’ve been testing the Collection repeat directive in order to improve rendering performance.
However, It seems that the ng-init Is not working as expected:

<div class="item"
    collection-repeat="post in posts"
    collection-item-width="'100%'"
    collection-item-height="getPostHeight(post)">
     <div ng-controller="PostCtrl" ng-init="register(post)">
        {{post.description}}
    </div>
</div>

Then, my register fuction in the PostCtrl controller:

$scope.register = function(post)
{
  console.log(post)
}

That function works with the ng-repeat directive, however, when using the collection-repeat directive, the register function will output “undefined” to the console :frowning:

Am I doing something wrong? Thanks in advance!


[v1.0.0-beta.11] Collection Repeat doesn't work with Directives
#2

Potentially related to the following (i am having similar issues):