- Ionic:Hybrid Mobile App Development
- Rahat Khanna Sani Yusuf Hoc Phan
- 176字
- 2021-07-09 19:00:35
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:

- Visual FoxPro程序設(shè)計(jì)教程
- Learning AWS Lumberyard Game Development
- 信息安全技術(shù)
- 可解釋機(jī)器學(xué)習(xí):模型、方法與實(shí)踐
- Nagios Core Administration Cookbook(Second Edition)
- 區(qū)塊鏈項(xiàng)目開(kāi)發(fā)指南
- Simulation for Data Science with R
- Go Systems Programming
- 計(jì)算機(jī)程序的構(gòu)造和解釋?zhuān)↗avaScript版)
- SQL Server 2014 Development Essentials
- TypeScript High Performance
- Neo4j權(quán)威指南 (圖數(shù)據(jù)庫(kù)技術(shù)叢書(shū))
- Unity與C++網(wǎng)絡(luò)游戲開(kāi)發(fā)實(shí)戰(zhàn):基于VR、AI與分布式架構(gòu)
- Mastering Swift 4(Fourth Edition)
- Daniel Arbuckle's Mastering Python