mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
watchCollection on right- and leftButtons to align headerBar title
This commit is contained in:
4
js/ext/angular/src/directive/ionicBar.js
vendored
4
js/ext/angular/src/directive/ionicBar.js
vendored
@@ -48,12 +48,12 @@ angular.module('ionic.ui.header', ['ngAnimate', 'ngSanitize'])
|
||||
|
||||
$scope.headerBarView = hb;
|
||||
|
||||
$scope.$watch('leftButtons', function(val) {
|
||||
$scope.$watchCollection('leftButtons', function(val) {
|
||||
// Resize the title since the buttons have changed
|
||||
hb.align();
|
||||
});
|
||||
|
||||
$scope.$watch('rightButtons', function(val) {
|
||||
$scope.$watchCollection('rightButtons', function(val) {
|
||||
// Resize the title since the buttons have changed
|
||||
hb.align();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user