Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footers, Headers, NavBars: API Proposal #777

Closed
ajoslin opened this issue Mar 13, 2014 · 8 comments
Closed

Footers, Headers, NavBars: API Proposal #777

ajoslin opened this issue Mar 13, 2014 · 8 comments
Assignees

Comments

@ajoslin
Copy link
Contributor

ajoslin commented Mar 13, 2014

Header

<ion-header-bar align-title="left">
  <div class="buttons">
    <button class="button">Hello Left!</button>
  </div>
  <h1 class="title">Title</h1>
  <div class="buttons">
    <button class="button">Hello Right!</button>
  </div>
</ion-header-bar>
<ion-content>
  Some content!
</ion-content>

Footer

<ion-content>
  Some content!
</ion-content>
<ion-footer-bar align-title="left">
  <div class="buttons">
    <button class="button">Hello Left!</button>
  </div>
  <h1 class="title">Title</h1>
  <div class="buttons">
    <button class="button">Hello Right!</button>
  </div>
</ion-footer-bar>

NavBar

<ion-nav-bar>
</ion-nav-bar>
<ion-nav-view>
  <ion-view>
    <ion-nav-buttons side="left">
      <button class="button">Hello Left!</button>
    </ion-nav-buttons>
    <ion-nav-buttons side="right">
      <button class="button">Hello Right!</button>
    </ion-nav-buttons>
    <ion-content>
      Some content!
    </ion-content>
  </ion-view>
</ion-nav-view>
@ajoslin
Copy link
Contributor Author

ajoslin commented Mar 13, 2014

Declarative NavBar Back

<ion-nav-bar>
  <!-- ng-click is overrideable by dev; defaults to go back -->
  <ion-nav-back class="ion-arrow-left-c">
    Back!
  </ion-nav-back>
</ion-nav-bar>

@mlynch
Copy link
Contributor

mlynch commented Mar 13, 2014

This at least seems like an improvement over the old API for the nav bar. The question then is what's the point of ion-header-bar or ion-footer-bar if it only handles header alilgnment?

@ajoslin
Copy link
Contributor Author

ajoslin commented Mar 13, 2014

State management like #619

@adamdbradley
Copy link
Contributor

Seems pretty clear actually. And you could use ng-repeat if you wanted, and even have more buttons after the repeat, so yeah, I think this format is much more flexible. What are the negatives to doing it this way?

@ajoslin
Copy link
Contributor Author

ajoslin commented Mar 13, 2014

I can't think of any negatives besides verbosity, to be honest.

@rvanbaalen
Copy link

@ajoslin Is verbosity a negative?

API looks good to me.

@ajoslin
Copy link
Contributor Author

ajoslin commented Mar 14, 2014

Landed via bfcfae3

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants