mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ionNavButtons): multiple ionNavButtons elements align correctly
Fixes #930 Uses a `<span>` now for each set buttons in the navbar, instead of a `<div>`. This means that the buttons will align correctly instead of creating new lines for each set of buttons.
This commit is contained in:
4
js/ext/angular/src/directive/ionicNavBar.js
vendored
4
js/ext/angular/src/directive/ionicNavBar.js
vendored
@@ -450,11 +450,11 @@ function($ionicViewService, $rootScope, $animate, $compile) {
|
||||
navBarCtrl.rightButtonsElement :
|
||||
navBarCtrl.leftButtonsElement;
|
||||
|
||||
//Put all of our inside buttons into their own div,
|
||||
//Put all of our inside buttons into their own span,
|
||||
//so we can remove them all when this element dies -
|
||||
//even if the buttons have changed through an ng-repeat or the like,
|
||||
//we just remove their div parent and they are gone.
|
||||
var buttons = angular.element('<div>').append(content);
|
||||
var buttons = angular.element('<span>').append(content);
|
||||
|
||||
//Compile buttons inside content so they have access to everything
|
||||
//something inside content does (eg parent ionicScroll)
|
||||
|
||||
Reference in New Issue
Block a user