- 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:

- Spring Boot 2實戰之旅
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- Arduino開發實戰指南:LabVIEW卷
- Mastering Linux Security and Hardening
- Odoo 10 Implementation Cookbook
- Visual FoxPro 6.0程序設計
- 一步一步跟我學Scratch3.0案例
- 深入實踐DDD:以DSL驅動復雜軟件開發
- H5+移動營銷設計寶典
- 分布式數據庫HBase案例教程
- Android初級應用開發
- Elastix Unified Communications Server Cookbook
- HTML5 Game Development by Example:Beginner's Guide(Second Edition)
- C++從零開始學(視頻教學版)(第2版)
- jQuery Essentials