mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
docs(demos/switch): api demo
This commit is contained in:
2
demos/switch/app.html
Normal file
2
demos/switch/app.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<ion-nav id="nav" [root]="rootPage" #content></ion-nav>
|
||||||
|
<ion-overlay></ion-overlay>
|
20
demos/switch/index.ts
Normal file
20
demos/switch/index.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import {App, Page, IonicApp} from 'ionic/ionic';
|
||||||
|
|
||||||
|
@App({
|
||||||
|
templateUrl: 'app.html'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.rootPage = InitialPage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'main.html'
|
||||||
|
})
|
||||||
|
export class InitialPage {
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
57
demos/switch/main.html
Normal file
57
demos/switch/main.html
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<ion-navbar *navbar>
|
||||||
|
<ion-title>Switch</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-list>
|
||||||
|
<ion-switch value="foo" checked="true">
|
||||||
|
Frodo Baggins
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch energized>
|
||||||
|
Sam
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch danger checked="true">
|
||||||
|
Éowyn
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch royal checked="true">
|
||||||
|
Legolas
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch danger>
|
||||||
|
Gimli
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch dark checked="true">
|
||||||
|
Saruman
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch energized checked="true">
|
||||||
|
Gandalf
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch royal>
|
||||||
|
Arwen
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch secondary checked="true">
|
||||||
|
Treebeard
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch royal>
|
||||||
|
Boromir
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch dark checked="true">
|
||||||
|
Gollum
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
<ion-switch energized>
|
||||||
|
Galadriel
|
||||||
|
</ion-switch>
|
||||||
|
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
<ion-content>
|
@ -67,7 +67,7 @@ class MediaSwitch {
|
|||||||
*
|
*
|
||||||
* </ion-list>
|
* </ion-list>
|
||||||
* ```
|
* ```
|
||||||
*
|
* @demo /docs/v2/demos/switch/
|
||||||
* @see {@link /docs/v2/components#switch Switch Component Docs}
|
* @see {@link /docs/v2/components#switch Switch Component Docs}
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
|
Reference in New Issue
Block a user