mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
docs(demos): add title demo which uses the toolbar demo but hides some
Hiding any toolbars that don’t use ion-title for the title demo only references driftyco/ionic-site#397
This commit is contained in:
15
demos/title/index.ts
Normal file
15
demos/title/index.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import {App} from 'ionic/ionic';
|
||||
|
||||
// Use the toolbar demo but pass in the demo name to change the title
|
||||
// this will also hide some of the toolbars that don't use `ion-title`
|
||||
@App({
|
||||
templateUrl: '../toolbar/main.html'
|
||||
})
|
||||
class ApiDemoApp {
|
||||
constructor() {
|
||||
this.demo = "Title";
|
||||
|
||||
this.favorites = "recent";
|
||||
this.apps = "free";
|
||||
}
|
||||
}
|
@ -93,7 +93,7 @@
|
||||
</button>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-toolbar *ngIf="demo != 'Title'">
|
||||
<ion-buttons end>
|
||||
<button #button2 (click)="buttonClick(button2)">
|
||||
<ion-icon name="search"></ion-icon>
|
||||
@ -109,7 +109,7 @@
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-toolbar *ngIf="demo != 'Title'">
|
||||
<ion-segment [(ngModel)]="apps">
|
||||
<ion-segment-button value="paid">
|
||||
Paid
|
||||
@ -123,11 +123,11 @@
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-toolbar *ngIf="demo != 'Title'">
|
||||
<ion-searchbar></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-toolbar primary>
|
||||
<ion-toolbar primary *ngIf="demo != 'Title'">
|
||||
<ion-searchbar></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
|
@ -136,7 +136,7 @@ export class Toolbar extends ToolbarBase {
|
||||
* <ion-title>SubHeader</ion-title>
|
||||
* </ion-toolbar>
|
||||
* ```
|
||||
* @demo /docs/v2/demos/toolbar/
|
||||
* @demo /docs/v2/demos/title/
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ion-title',
|
||||
|
Reference in New Issue
Block a user