Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions quick-ng-repeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ angular.module('QuickList', []);
angular.module('QuickList').value('quickRepeatList', {});

angular.module('QuickList').directive('quickNgRepeat',
['$parse', '$animate', 'quickRepeatList', function($parse, $animate, quick_repeat_list) {
['$parse', '$animate', '$interpolate', 'quickRepeatList', function($parse, $animate, $interpolate, quick_repeat_list) {
var NG_REMOVED = '$$NG_REMOVED';
var ngRepeatMinErr = 'err';
var uid = ['0', '0', '0'];
Expand Down Expand Up @@ -128,7 +128,12 @@ angular.module('QuickList').directive('quickNgRepeat',
// - index: position
var lastBlockMap = {};

var list_name = $attr.quickRepeatList || list_id();
var list_name = $attr.quickRepeatList;
if (list_name) {
list_name = $interpolate(list_name)($scope);
} else {
list_name = list_id();
}

//watch props
$scope.$watch(rhs, quick_repeat_list[list_name] = function(collection){
Expand Down