File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 2020 restrict : 'AEC' ,
2121 require : req ,
2222 scope : true ,
23- compile : function ( elm ) {
24- var link = {
23+ compile : function ( elm , attr ) {
24+ var watchExp = attr [ name ] || ( isRoot ? attr . root : attr . node ) ,
25+ template ,
26+ link = {
2527 post : function ( scope , elm , attr , ctrl ) {
2628 scope . $dxLevel = isRoot ? 0 : scope . $dxLevel + 1 ;
2729 scope . $dxIsRoot = isRoot ;
28- scope . $dxPrior = scope . $dxParent = isRoot
29- ? parse ( attr [ name ] || attr . root ) ( scope )
30- : parse ( attr [ name ] || attr . node ) ( scope ) ;
3130
3231 elm . html ( ctrl . template ( ) ) ;
3332 compile ( elm . contents ( ) ) ( scope ) ;
33+
34+ function updatePrior ( value ) {
35+ scope . $dxPrior = value ;
36+ }
37+ scope . $watch ( watchExp , updatePrior ) ;
3438 }
3539 } ;
3640 if ( isRoot ) {
37- var template = elm . html ( ) ;
41+ template = elm . html ( ) ;
3842 elm . html ( '' ) ;
3943 link . pre = function ( scope , elm , attr , ctrl ) {
4044 ctrl . template ( template ) ;
5761
5862 comp . directive ( 'dxStartWith' , $NodeDirective ( true , 'dxStartWith' , 'dxStartWith' ) ) ;
5963 comp . directive ( 'dxConnect' , $NodeDirective ( false , 'dxConnect' , '^dxStartWith' ) ) ;
60- } ( ) ) ;
64+ } ( ) ) ;
You can’t perform that action at this time.
0 commit comments