mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
docs(footer, header): add docs
This commit is contained in:
@ -6,7 +6,31 @@ import { ViewController } from '../nav/view-controller';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @name Header
|
||||||
|
* @description
|
||||||
|
* Header is a parent compnent that holds the navbar and toolbar component.
|
||||||
|
* It's important to note that `ion-header` needs to be the one of the three root elements of a page
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* @Component({
|
||||||
|
* template: `
|
||||||
|
* <ion-header>
|
||||||
|
* <ion-navbar>
|
||||||
|
* <ion-title>Page1</ion-title>
|
||||||
|
* </ion-navbar>
|
||||||
|
*
|
||||||
|
* <ion-toolbar>
|
||||||
|
* <ion-title>Subheader</ion-title>
|
||||||
|
* </ion-toolbar>
|
||||||
|
* </ion-header>
|
||||||
|
*
|
||||||
|
* <ion-content></ion-content>
|
||||||
|
* `
|
||||||
|
* })
|
||||||
|
* ```
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'ion-header'
|
selector: 'ion-header'
|
||||||
@ -21,7 +45,26 @@ export class Header {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @name Footer
|
||||||
|
* @description
|
||||||
|
* Footer is a root component of a page that sits at the bottom of the page.
|
||||||
|
* Footer can be a wrapper for `ion-toolbar` to make sure the content area is sized correctly.
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* @Component({
|
||||||
|
* template: `
|
||||||
|
* <ion-content></ion-content>
|
||||||
|
* <ion-footer>
|
||||||
|
* <ion-toolbar>
|
||||||
|
* <ion-title>Footer</ion-title>
|
||||||
|
* </ion-toolbar>
|
||||||
|
* </ion-footer>
|
||||||
|
* `
|
||||||
|
* })
|
||||||
|
* ```
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'ion-footer'
|
selector: 'ion-footer'
|
||||||
|
Reference in New Issue
Block a user