docs(ionNavBar): add note about ion-view, update example

This commit is contained in:
Andrew Joslin
2014-05-20 12:22:10 -06:00
parent d6ba52208e
commit 712e7d8cbf

View File

@@ -18,6 +18,9 @@
* Assign an [animation class](/docs/components#animations) to the element to
* enable animated changing of titles (recommended: 'nav-title-slide-ios7')
*
* Note that the ion-nav-bar element will only work correctly if your content has an
* ionView around it.
*
* @usage
*
* ```html
@@ -27,7 +30,11 @@
* </ion-nav-bar>
*
* <!-- where the initial view template will be rendered -->
* <ion-nav-view></ion-nav-view>
* <ion-nav-view>
* <ion-view>
* <ion-content>Hello!</ion-content>
* </ion-view>
* </ion-nav-view>
* </body>
* ```
*
@@ -49,17 +56,17 @@
*
*
* ```html
* <ion-nav-bar class="bar-positive">
* <ion-nav-back-button>
* Back
* </ion-nav-back-button>
* <div class="buttons right-buttons">
* <button class="button">
* Right Button
* </button>
* </div>
* </ion-nav-bar>
* <ion-view title="myTitle">
* <ion-nav-bar class="bar-positive">
* <ion-nav-back-button>
* Back
* </ion-nav-back-button>
* <div class="buttons right-buttons">
* <button class="button">
* Right Button
* </button>
* </div>
* </ion-nav-bar>
* </ion-view>
* ```
*/