官术网_书友最值得收藏!

Ionic header and footer

Ionic has many directives to help common layouts in mobile apps. Ionic headers and footers are important directives for showing proper context for any view in a mobile app. The exact directives, name and their usage are detailed as follows.

The <ion-header-bar> directive

This directive adds a fixed header bar above any content. You can also add a subheader by adding a CSS class bar-subheader on the second <ion-header-bar> directive, which will be shown below the primary header. The sample code for usage is as follows:

<ion-header-bar align-title="left" class="bar-positive">
  <div class="buttons">
    <button class="button" ng-click="back()">Back</button>
  </div>
  <h1 class="title">All about Books</h1>
  <div class="buttons"> <button class="button">Logout</button>
  </div>
</ion-header-bar>

There are two attributes available on the directive to add functionality to the header bar as shown in the following table:

The <ion-footer-bar> directive

This directive adds a fixed footer bar below some content similar to the header bar. There can be a subfooter by adding the class bar-subfooter. The sample code for usage is as follows:

<ion-footer-bar align-title="left" class="bar-assertive">
  <div class="buttons">
    <button class="button">Back</button>
  </div>
  <h1 class="title">All about Books</h1>
  <div class="buttons" ng-click="logout()">
    <button class="button">Logout</button>
  </div>
</ion-footer-bar>

There is only one attribute available on the directive to add functionality to the footer bar as shown in the following table:

主站蜘蛛池模板: 洛扎县| 长白| 定陶县| 舟山市| 闽侯县| 永兴县| 沁水县| 阿克陶县| 郎溪县| 双牌县| 长岭县| 克拉玛依市| 潍坊市| 弥勒县| 湖州市| 浙江省| 神池县| 高雄市| 阜康市| 两当县| 秦皇岛市| 九台市| 扶余县| 迭部县| 雷州市| 岳阳市| 泾源县| 三原县| 周至县| 江川县| 望江县| 阿城市| 大渡口区| 龙陵县| 翁牛特旗| 马关县| 长丰县| 安康市| 土默特右旗| 罗江县| 西盟|