mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
Sink
This commit is contained in:
@ -15,18 +15,18 @@ import {SinkPage} from '../sink-page';
|
||||
<ion-content class="padding">
|
||||
<h2>Aside</h2>
|
||||
<p>
|
||||
Asides, also known as side menus or "hamburger" menus, are menus that slide
|
||||
Asides, also known as side menus or "hamburger" menus (mmmmm), are menus that slide
|
||||
or swipe in to show menus or information.
|
||||
</p>
|
||||
<p>
|
||||
Try it! Just swipe from the left edge of the screen to the right to expose
|
||||
the app menu.
|
||||
the app menu, or tap the button to toggle the menu:
|
||||
</p>
|
||||
<p>
|
||||
<div class="height: 50px; background-color: E05780; width: 5px; margin-left: -15px"></div>
|
||||
</p>
|
||||
<p>
|
||||
<button primary (click)="openMenu()">Open Menu</button>
|
||||
<button primary (click)="toggleMenu()">Toggle</button>
|
||||
</p>
|
||||
</ion-content>
|
||||
`,
|
||||
|
@ -1,15 +1,16 @@
|
||||
import {Component, Directive, View} from 'angular2/angular2';
|
||||
|
||||
import {List, Item, ActionMenu, Modal, ModalRef,
|
||||
import {IonicApp, List, Item, ActionMenu, Modal, ModalRef,
|
||||
NavbarTemplate, Navbar, NavController, Content} from 'ionic/ionic';
|
||||
|
||||
import {SinkPage} from '../sink-page';
|
||||
|
||||
@Component({
|
||||
selector: 'ion-view'
|
||||
})
|
||||
@View({
|
||||
template: `
|
||||
<ion-navbar *navbar><ion-title>Cards</ion-title></ion-navbar>
|
||||
<ion-navbar *navbar><ion-nav-items primary><button icon (^click)="toggleMenu()"><i class="icon ion-navicon"></i></button></ion-nav-items><ion-title>Cards</ion-title></ion-navbar>
|
||||
|
||||
<ion-content class="padding">
|
||||
<h2>Cards</h2>
|
||||
@ -50,7 +51,8 @@ import {List, Item, ActionMenu, Modal, ModalRef,
|
||||
`,
|
||||
directives: [NavbarTemplate, Navbar, Content, List, Item]
|
||||
})
|
||||
export class CardPage {
|
||||
constructor() {
|
||||
export class CardPage extends SinkPage {
|
||||
constructor(app: IonicApp) {
|
||||
super(app);
|
||||
}
|
||||
}
|
||||
|
@ -2,16 +2,17 @@ import {Component, Directive, View} from 'angular2/angular2';
|
||||
|
||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {List, Item, Input, ActionMenu, Modal, ModalRef,
|
||||
import {IonicApp, List, Item, Input, ActionMenu, Modal, ModalRef,
|
||||
NavbarTemplate, Navbar, NavController, Content} from 'ionic/ionic';
|
||||
|
||||
import {SinkPage} from '../sink-page';
|
||||
|
||||
@Component({
|
||||
selector: 'ion-view'
|
||||
})
|
||||
@View({
|
||||
template: `
|
||||
<ion-navbar *navbar><ion-title>Cards</ion-title></ion-navbar>
|
||||
<ion-navbar *navbar><ion-nav-items primary><button icon (^click)="toggleMenu()"><i class="icon ion-navicon"></i></button></ion-nav-items><ion-title>Form</ion-title></ion-navbar>
|
||||
|
||||
<ion-content class="padding">
|
||||
<h2>Forms</h2>
|
||||
@ -23,7 +24,7 @@ import {List, Item, Input, ActionMenu, Modal, ModalRef,
|
||||
Ionic comes with a variety of useful from controls, like
|
||||
text inputs, text areas, toggle switches, and sliders.
|
||||
</p>
|
||||
<form (^submit)="doSubmit($event)" [control-group]="form">
|
||||
<form (^submit)="doSubmit($event)" [ng-form-model]="form">
|
||||
<ion-input>
|
||||
<input control="email" type="email" placeholder="Your email">
|
||||
</ion-input>
|
||||
@ -37,7 +38,9 @@ import {List, Item, Input, ActionMenu, Modal, ModalRef,
|
||||
directives: [formDirectives, NavbarTemplate, Navbar, Content, List, Item, Input]
|
||||
})
|
||||
export class FormPage {
|
||||
constructor() {
|
||||
constructor(app: IonicApp) {
|
||||
super(app);
|
||||
|
||||
var fb = new FormBuilder()
|
||||
|
||||
this.form = fb.group({
|
||||
|
@ -1,20 +1,21 @@
|
||||
import {Component, Directive, View} from 'angular2/angular2';
|
||||
|
||||
import {List, Item, ActionMenu, Modal, ModalRef,
|
||||
import {IonicApp, List, Item, ActionMenu, Modal, ModalRef,
|
||||
NavbarTemplate, Navbar, NavController, Content} from 'ionic/ionic';
|
||||
|
||||
import {SinkPage} from '../sink-page';
|
||||
|
||||
@Component({
|
||||
selector: 'ion-view'
|
||||
})
|
||||
@View({
|
||||
template: `
|
||||
<ion-navbar *navbar><ion-title>Ionicons</ion-title></ion-navbar>
|
||||
<ion-navbar *navbar><ion-nav-items primary><button icon (^click)="toggleMenu()"><i class="icon ion-navicon"></i></button></ion-nav-items><ion-title>Icons</ion-title></ion-navbar>
|
||||
|
||||
<ion-content class="padding">
|
||||
<h2>Ionicons</h2>
|
||||
<h2>Icons</h2>
|
||||
<p>
|
||||
Ionic comes with a totally free (in price and license), icon pack with over 700
|
||||
Ionic comes with a totally free (in price and license), icon pack (known as "Ionicons") with over 700
|
||||
icons for your app.
|
||||
</p>
|
||||
<p>
|
||||
@ -27,7 +28,8 @@ import {List, Item, ActionMenu, Modal, ModalRef,
|
||||
`,
|
||||
directives: [NavbarTemplate, Navbar, Content, List, Item]
|
||||
})
|
||||
export class IconsPage {
|
||||
constructor() {
|
||||
export class IconsPage extends SinkPage {
|
||||
constructor(app: IonicApp) {
|
||||
super(app);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import {Renderer, ElementRef, EventEmitter, onInit, Ancestor, forwardRef} from 'angular2/angular2';
|
||||
import {View, Renderer, ElementRef, EventEmitter, onInit, Ancestor, forwardRef} from 'angular2/angular2';
|
||||
import {Control, NgControl,NgFormControl} from 'angular2/forms';
|
||||
import {ControlGroup, ControlDirective} from 'angular2/forms'
|
||||
|
||||
import {IonicDirective, IonicComponent, IonicView} from '../../config/annotations'
|
||||
import {dom} from 'ionic/util';
|
||||
|
||||
console.log(forwardRef(() => SegmentButton));
|
||||
|
||||
@IonicComponent({
|
||||
selector: 'ion-segment',
|
||||
@ -27,7 +28,7 @@ import {dom} from 'ionic/util';
|
||||
*/
|
||||
}
|
||||
})
|
||||
@IonicView({
|
||||
@View({
|
||||
template: '<div class="ion-segment"><content></content></div>',
|
||||
directives: [forwardRef(() => SegmentButton)]
|
||||
})
|
||||
|
Reference in New Issue
Block a user