Skip to content

Commit 70be42a

Browse files
committed
Not working with debugInfoEnabled l-lin#746
1 parent 4e92143 commit 70be42a

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

demo/app.js

+5
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,18 @@ angular.module('showcase', [
4343
.config(sampleConfig)
4444
.config(routerConfig)
4545
.config(translateConfig)
46+
.config(debugDisabled)
4647
.run(initDT);
4748

4849
backToTop.init({
4950
theme: 'classic', // Available themes: 'classic', 'sky', 'slate'
5051
animation: 'fade' // Available animations: 'fade', 'slide'
5152
});
5253

54+
function debugDisabled($compileProvider)  {
55+
$compileProvider.debugInfoEnabled(false);
56+
}
57+
5358
function sampleConfig(hljsServiceProvider) {
5459
hljsServiceProvider.setOptions({
5560
// replace tab with 4 spaces

dist/angular-datatables.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,11 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
871871
dtInstance = DTInstanceFactory.newDTInstance(renderer);
872872

873873
var defer = $q.defer();
874-
var _expression = $elem.find('tbody').html();
874+
var _$tableElem = _staticHTML.match(/<tbody([\s\S]*)<\/tbody>/i);
875+
var _expression = _$tableElem[1];
875876
// Find the resources from the comment <!-- ngRepeat: item in items --> displayed by angular in the DOM
876877
// This regexp is inspired by the one used in the "ngRepeat" directive
877-
var _match = _expression.match(/^\s*.+?\s+in\s+(\S*)\s*/m);
878+
var _match = _expression.match(/^\s*.+?\s+in\s+([a-zA-Z0-9\.-_]*)\s*/m);
878879

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

0 commit comments

Comments
 (0)