Browse Source

Merge pull request #191 from aksyonov/master

Fixed angular directive for complex ng-repeat expressions
pull/198/head
Lebedev Konstantin 10 years ago
parent
commit
063ee8c250
  1. 2
      ng-sortable.js

2
ng-sortable.js

@ -17,7 +17,7 @@ angular.module('ng-sortable', [])
(node.nodeValue.indexOf('ngRepeat:') !== -1)
);
})[0];
ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*([^\s]+)\s+in\s+([^\s|]+)/);
ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);
var itemExpr = $parse(ngRepeat[1]);
var itemsExpr = $parse(ngRepeat[2]);

Loading…
Cancel
Save