File tree Expand file tree Collapse file tree
src/ui/public/kbn_top_nav Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default function ($compile) {
1818 interval : intervalTemplate ,
1919 filter : filterTemplate ,
2020 } ;
21- this . controllers = [ ] ;
21+ this . locals = { } ;
2222
2323 this . addItems ( opts ) ;
2424 }
@@ -36,8 +36,8 @@ export default function ($compile) {
3636 this . opts . push ( opt ) ;
3737 if ( ! opt . hideButton ( ) ) this . menuItems . push ( opt ) ;
3838 if ( opt . template ) this . templates [ opt . key ] = opt . template ;
39- if ( opt . controller ) {
40- this . controllers [ opt . key ] = opt . controller ;
39+ if ( opt . locals ) {
40+ this . locals [ opt . key ] = opt . locals ;
4141 }
4242 } ) ;
4343 }
@@ -111,8 +111,8 @@ export default function ($compile) {
111111 }
112112
113113 const $childScope = $scope . $new ( ) ;
114- if ( this . controllers [ currentKey ] ) {
115- $childScope . controller = this . controllers [ currentKey ] ;
114+ if ( this . locals [ currentKey ] ) {
115+ Object . assign ( $childScope , this . locals [ currentKey ] ) ;
116116 }
117117 const $el = $element . find ( '#template_wrapper' ) . html ( templateToRender ) . contents ( ) ;
118118 $compile ( $el ) ( $childScope ) ;
You can’t perform that action at this time.
0 commit comments