В данный момент пытаемся обновить версию с angularjs 1.2 до 1.3 и обнаружили проблему. Приложение имеет директиву подкачки:
app.directive("mobilePaginationList", function() {
return {
restrict: 'E',
templateUrl: "Directives/mobilePagination/List/mobilePaginationList.html",
transclude: true,
replace: true,
scope: {
list: '=list'
},
link: function ($scope, $element, $attributes) {
// code removed that is not relevant
$scope.listToDisplay = PaginationService.from(origList).getPage(page);
}
}
}
шаблон:
<div class="row">
<div class="col-xs-12">
<div data-ng-repeat="currentItem in listToDisplay" bindonce data-ng-transclude>
</div>
<mobile-pagination-pager data-ng-hide="vm.list.length <= 0"></mobile-pagination-pager>
</div>
</div>
пример использования:
<mobile-pagination-list data-receipt-slider-menu-toggle="active" list="receipts" data-ng-hide="list.length <= 0 || rootVm.loading.receipts.value" class="row list-group">
<a class="row list-group-item" data-bo-id="currentItem.attachNo" ui-sref="receiptWalletDetails({receiptId: currentItem.attachNo})">
<div class="col-xs-11">
<div class="row">
<div class="col-xs-8">
<h4 data-bo-bind="currentItem.description"></h4>
</div>
<div class="col-xs-4 text-right">
<h4 data-bo-bind="currentItem.amount | currency:''"></h4>
</div>
</div>
<div class="list-group-item-text">
<div class="row">
<div class="col-xs-8">
<span data-bo-bind="currentItem.notes"></span>
</div>
<div class="col-xs-4 text-right">
<span class="text-info"
data-bo-bind="currentItem.createDate | date: 'd MMM yyyy'">
</span>
</div>
</div>
</div>
</div>
</a>
</mobile-pagination-list>
То, что происходит, это то, что ng-repeatправильно отображает количество строк, но каждая строка не содержит данных из объекта currentItem. Строка содержит весь HTML-код, но в ней отсутствуют значения currentItem.
Я провел довольно много поисков этой проблемы, но пока не нашел решения.
Cheers