Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Enable regexp to find ngRepeat comment in multiple lines #252

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions src/angular-datatables.renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererServic
var _expression = $elem.find('tbody').html();
// Find the resources from the comment <!-- ngRepeat: item in items --> displayed by angular in the DOM
// This regexp is inspired by the one used in the "ngRepeat" directive
var _match = _expression.match(/^\s*.+?\s+in\s+(\S*)\s*/);
var _ngRepeatAttr = _match[1];
var _match = _expression.match(/^\s*.+?\s+in\s+(\S*)\s*/m);

if (!_match) {
throw new Error('Expected expression in form of "_item_ in _collection_[ track by _id_]" but got "{0}".', _expression);
}
var _ngRepeatAttr = _match[1];

var _alreadyRendered = false;

Expand Down