question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`<ion-buttons start>` not working inside `<ion-navbar>`

See original GitHub issue

Ionic version: (check one with “x”) [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x

I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: Trying to just copy and paste documentation example of how to add buttons to a navbar (From here: https://ionicframework.com/docs/components/#buttons-in-components).

The example contains two ion-buttons component, with start and end directives each. The end directive runs fine. The start doesn’t.

Expected behavior:

It should work just as documented, no questions here.

Steps to reproduce:

I’ve made a plunker to reproduce it: http://embed.plnkr.co/KQluWF/

Related code:

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.4.0
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.12
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Ionic Framework                 : ionic-angular 3.5.0

System:

    Node       : v6.11.0
    OS         : Linux 4.4
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.0.4 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
brandyscarneycommented, Jul 11, 2017

This is actually the desired behavior for both the buttons and titles. The Toolbar Docs have a more detailed explanation of where the buttons are placed in toolbar/navbars:

Property Description
start Positions element to the left of the content in ios mode, and directly to the right in md and wp mode.
end Positions element to the right of the content in ios mode, and to the far right in md and wp mode.
left Positions element to the left of all other elements.
right Positions element to the right of all other elements.

What this means is in ios mode using start will be placed to the left of any content (for example a title), and in md/wp mode it will be placed to the right of any content. If you want a button to always be on the left of any content, regardless of the mode, you should use the left attribute:

<ion-header>
  <ion-navbar>
    <ion-buttons left>
      <button ion-button icon-only>
        <ion-icon name="contact"></ion-icon>
      </button>
    </ion-buttons>
    <ion-buttons end>
      <button ion-button icon-only>
        <ion-icon name="search"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>

Please let me know if you have questions, thanks!

0reactions
ionitron-bot[bot]commented, Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<ion-buttons start> not working inside <ion-navbar> #12223
Investigating the issue, found that if I emulate IOS on firefox, the button goes to the left as expected, but if I emulate...
Read more >
Custom component not working properly inside <ion-header>
I'm having a problem using a custom component inside on my ionic2 pages, apparently elements using ionic directives are not properly styled ...
Read more >
ion-button is not working while using in div - Stack Overflow
I am using ionic angular,ion-button is not working in some parts of code,but it is working in some parts of code.The button is...
Read more >
Ionic Responsive Design and Navigation for All Screens
Setting up our Responsive Ionic App. To get started, bring up a new Ionic app and add a few pages for our routing....
Read more >
How to Navigate in Ionic Modals with ion-nav - Ionic Blog
Let's build an app with navigation inside of a modal and make everything work, including the Android back button as well!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found