mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
docs(demos): add item demo which uses list demo but changes header
references driftyco/ionic-site#397
This commit is contained in:
11
demos/item/index.ts
Normal file
11
demos/item/index.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import {App} from 'ionic/ionic';
|
||||||
|
|
||||||
|
// Uses the list's demo but passes the demo var to change the title
|
||||||
|
@App({
|
||||||
|
templateUrl: '../list/main.html'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
constructor() {
|
||||||
|
this.demo = "Item";
|
||||||
|
}
|
||||||
|
}
|
@ -3,4 +3,8 @@ import {App} from 'ionic/ionic';
|
|||||||
@App({
|
@App({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoApp {
|
||||||
|
constructor() {
|
||||||
|
this.demo = "List";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>List</ion-title>
|
<ion-title>{{demo}}</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-content class="outer-content">
|
<ion-content class="outer-content">
|
||||||
|
@ -35,6 +35,7 @@ import {Label} from '../label/label';
|
|||||||
* </ion-list>
|
* </ion-list>
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
* @demo /docs/v2/demos/item/
|
||||||
* @see {@link /docs/v2/components#lists List Component Docs}
|
* @see {@link /docs/v2/components#lists List Component Docs}
|
||||||
* @see {@link ../../list/List List API Docs}
|
* @see {@link ../../list/List List API Docs}
|
||||||
*/
|
*/
|
||||||
@ -157,4 +158,3 @@ export class Item {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user