File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 16
16
$elem . show ( ) ;
17
17
$loading . hide ( ) ;
18
18
} ;
19
- var _doRenderDataTable = function ( $elem , options ) {
19
+ var _doRenderDataTable = function ( $elem , options , $scope ) {
20
20
// Add $timeout to be sure that angular has finished rendering before calling datatables
21
21
$timeout ( function ( ) {
22
22
_hideLoading ( $elem ) ;
23
23
$elem . DataTable ( options ) ;
24
+ $scope . $emit ( 'event:dataTableLoaded' , { id : $elem . attr ( 'id' ) } ) ;
24
25
} , 0 , false ) ;
25
26
} ;
26
27
53
54
return {
54
55
options : options ,
55
56
render : function ( $scope , $elem ) {
56
- _doRenderDataTable ( $elem , this . options ) ;
57
+ _doRenderDataTable ( $elem , this . options , $scope ) ;
57
58
}
58
59
} ;
59
60
} ;
70
71
render : function ( $scope , $elem ) {
71
72
var _this = this ;
72
73
$scope . $on ( DT_LAST_ROW_KEY , function ( ) {
73
- _doRenderDataTable ( $elem , _this . options ) ;
74
+ _doRenderDataTable ( $elem , _this . options , $scope ) ;
74
75
} ) ;
75
76
}
76
77
} ;
You can’t perform that action at this time.
0 commit comments