@@ -1311,6 +1311,13 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
13111311 }
13121312 } ) ;
13131313
1314+ // If a nav page changes the left or right buttons, update our scope vars
1315+ $scope . $parent . $on ( 'navRouter.leftButtonsChanged' , function ( e , data ) {
1316+ $scope . leftButtons = data ;
1317+ } ) ;
1318+ $scope . $parent . $on ( 'navRouter.rightButtonsChanged' , function ( e , data ) {
1319+ $scope . rightButtons = data ;
1320+ } ) ;
13141321
13151322 /*
13161323 $scope.$parent.$on('navigation.push', function() {
@@ -1361,14 +1368,17 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
13611368 $scope . $watch ( leftButtonsGet , function ( value ) {
13621369 $scope . leftButtons = value ;
13631370 if ( $scope . doesUpdateNavRouter ) {
1364- $scope . $emit ( 'navRouter.leftButtonsChanged' , $scope . rightButtons ) ;
1371+ $scope . $emit ( 'navRouter.leftButtonsChanged' , $scope . leftButtons ) ;
13651372 }
13661373 } ) ;
13671374
13681375 // watch for changes in the right buttons
13691376 var rightButtonsGet = $parse ( $attr . rightButtons ) ;
13701377 $scope . $watch ( rightButtonsGet , function ( value ) {
13711378 $scope . rightButtons = value ;
1379+ if ( $scope . doesUpdateNavRouter ) {
1380+ $scope . $emit ( 'navRouter.rightButtonsChanged' , $scope . rightButtons ) ;
1381+ }
13721382 } ) ;
13731383
13741384 // watch for changes in the title
0 commit comments