@@ -1311,6 +1311,13 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
1311
1311
}
1312
1312
} ) ;
1313
1313
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
+ } ) ;
1314
1321
1315
1322
/*
1316
1323
$scope.$parent.$on('navigation.push', function() {
@@ -1361,14 +1368,17 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
1361
1368
$scope . $watch ( leftButtonsGet , function ( value ) {
1362
1369
$scope . leftButtons = value ;
1363
1370
if ( $scope . doesUpdateNavRouter ) {
1364
- $scope . $emit ( 'navRouter.leftButtonsChanged' , $scope . rightButtons ) ;
1371
+ $scope . $emit ( 'navRouter.leftButtonsChanged' , $scope . leftButtons ) ;
1365
1372
}
1366
1373
} ) ;
1367
1374
1368
1375
// watch for changes in the right buttons
1369
1376
var rightButtonsGet = $parse ( $attr . rightButtons ) ;
1370
1377
$scope . $watch ( rightButtonsGet , function ( value ) {
1371
1378
$scope . rightButtons = value ;
1379
+ if ( $scope . doesUpdateNavRouter ) {
1380
+ $scope . $emit ( 'navRouter.rightButtonsChanged' , $scope . rightButtons ) ;
1381
+ }
1372
1382
} ) ;
1373
1383
1374
1384
// watch for changes in the title
0 commit comments