mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
refactor(demos): forms and input
This commit is contained in:
13
demos/component-docs/cards/advanced-map/pages.ts
Normal file
13
demos/component-docs/cards/advanced-map/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/advanced-map/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class AdvancedMapPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/cards/advanced-social/pages.ts
Normal file
13
demos/component-docs/cards/advanced-social/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/advanced-social/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class AdvancedSocialPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/cards/advanced-weather/pages.ts
Normal file
13
demos/component-docs/cards/advanced-weather/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/advanced-weather/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class AdvancedWeatherPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@ import {forwardRef} from 'angular2/angular2';
|
|||||||
import {AndroidAttribute} from '../../helpers';
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
@Page({
|
@Page({
|
||||||
templateUrl: 'cards/cards-background/main.html',
|
templateUrl: 'cards/background/template.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class BackgroundPage {
|
export class BackgroundPage {
|
13
demos/component-docs/cards/basic/pages.ts
Normal file
13
demos/component-docs/cards/basic/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/basic/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class BasicPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
<ion-navbar *navbar hide-back-button class="show-navbar android-attr">
|
|
||||||
<ion-title>Background Images</ion-title>
|
|
||||||
</ion-navbar>
|
|
||||||
|
|
||||||
<ion-content class="has-header components-demo cards-bg">
|
|
||||||
|
|
||||||
<ion-card class="advanced-background">
|
|
||||||
<img src="img/card-saopaolo.png"/>
|
|
||||||
<p class="advanced-background-title">São Paulo</p>
|
|
||||||
<p class="advanced-background-subtitle">41 Listings</p>
|
|
||||||
</ion-card>
|
|
||||||
|
|
||||||
<ion-card class="advanced-background">
|
|
||||||
<img src="img/card-amsterdam.png"/>
|
|
||||||
<p class="advanced-background-title">Amsterdam</p>
|
|
||||||
<p class="advanced-background-subtitle">64 Listings</p>
|
|
||||||
</ion-card>
|
|
||||||
|
|
||||||
<ion-card class="advanced-background">
|
|
||||||
<img src="img/card-sf.png"/>
|
|
||||||
<p class="advanced-background-title">San Francisco</p>
|
|
||||||
<p class="advanced-background-subtitle">72 Listings</p>
|
|
||||||
</ion-card>
|
|
||||||
|
|
||||||
<ion-card class="advanced-background">
|
|
||||||
<img src="img/card-madison.png"/>
|
|
||||||
<p class="advanced-background-title">Madison</p>
|
|
||||||
<p class="advanced-background-subtitle">28 Listings</p>
|
|
||||||
</ion-card>
|
|
||||||
|
|
||||||
</ion-content>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,76 +1,8 @@
|
|||||||
import {Page} from 'ionic/ionic';
|
export * from './advanced-map/pages';
|
||||||
import {forwardRef} from 'angular2/angular2';
|
export * from './advanced-social/pages';
|
||||||
import {AndroidAttribute} from '../helpers';
|
export * from './advanced-weather/pages';
|
||||||
|
export * from './background/pages';
|
||||||
export * from './cards-background/pages';
|
export * from './basic/pages';
|
||||||
|
export * from './header/pages';
|
||||||
@Page({
|
export * from './image/pages';
|
||||||
templateUrl: 'cards/cards-basic.html',
|
export * from './list/pages';
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class BasicPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-header.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class HeaderPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-list.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class ListPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-image.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class ImagePage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-advanced-social.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class AdvancedSocialPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-advanced-map.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class AdvancedMapPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-advanced-weather.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class AdvancedWeatherPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
13
demos/component-docs/cards/header/pages.ts
Normal file
13
demos/component-docs/cards/header/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/header/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class HeaderPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/cards/image/pages.ts
Normal file
13
demos/component-docs/cards/image/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/image/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class ImagePage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/cards/list/pages.ts
Normal file
13
demos/component-docs/cards/list/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/list/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class ListPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,91 +0,0 @@
|
|||||||
import {FORM_DIRECTIVES, FormBuilder, forwardRef, Validators, Control, ControlGroup} from 'angular2/angular2';
|
|
||||||
import {Page} from 'ionic/ionic';
|
|
||||||
import {AndroidAttribute} from '../helpers';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/forms.html',
|
|
||||||
providers: [FormBuilder],
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class FormsPage {
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
this.form = new ControlGroup({
|
|
||||||
firstName: new Control("", Validators.required),
|
|
||||||
lastName: new Control("", Validators.required)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
processForm(event) {
|
|
||||||
// TODO: display input in a popup
|
|
||||||
console.log(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/fixed-inline.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class FixedInlinePage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/floating.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class FloatingPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/inline.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class InlinePage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/inset.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class InsetPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/placeholder.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class PlaceholderPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'forms/stacked.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class StackedPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,22 +5,9 @@ import {Platform, Navbar} from 'ionic/ionic';
|
|||||||
import * as actionSheets from './action-sheets/action-sheets';
|
import * as actionSheets from './action-sheets/action-sheets';
|
||||||
import * as buttons from './buttons/buttons';
|
import * as buttons from './buttons/buttons';
|
||||||
import * as cards from './cards/cards';
|
import * as cards from './cards/cards';
|
||||||
|
import * as labels from './labels/labels';
|
||||||
import {FormsPage,
|
import * as icons from './icons/icons';
|
||||||
FixedInlinePage,
|
import * as inputs from './inputs/inputs';
|
||||||
FloatingPage,
|
|
||||||
InlinePage,
|
|
||||||
InsetPage,
|
|
||||||
PlaceholderPage,
|
|
||||||
StackedPage} from './forms/forms';
|
|
||||||
|
|
||||||
import {IconsPage} from './icons/icons';
|
|
||||||
|
|
||||||
import {CheckboxPage,
|
|
||||||
RadioPage,
|
|
||||||
RangePage,
|
|
||||||
SelectPage,
|
|
||||||
SwitchPage} from './inputs/inputs';
|
|
||||||
|
|
||||||
import {BasicListsPage,
|
import {BasicListsPage,
|
||||||
AvatarListsPage,
|
AvatarListsPage,
|
||||||
@ -117,21 +104,21 @@ export function getPageFor(hash) {
|
|||||||
'card-advanced-social': cards.AdvancedSocialPage,
|
'card-advanced-social': cards.AdvancedSocialPage,
|
||||||
'card-advanced-weather': cards.AdvancedWeatherPage,
|
'card-advanced-weather': cards.AdvancedWeatherPage,
|
||||||
|
|
||||||
'checkbox': CheckboxPage,
|
'checkbox': inputs.CheckboxPage,
|
||||||
'radio': RadioPage,
|
'radio': inputs.RadioPage,
|
||||||
'range': RangePage,
|
'range': inputs.RangePage,
|
||||||
'select': SelectPage,
|
'select': inputs.SelectPage,
|
||||||
'switch': SwitchPage,
|
'switch': inputs.SwitchPage,
|
||||||
|
|
||||||
'inputs': FormsPage,
|
'inputs': labels.BasicPage,
|
||||||
'fixed-inline-labels': FixedInlinePage,
|
'fixed-inline-labels': labels.FixedInlinePage,
|
||||||
'floating-labels': FloatingPage,
|
'floating-labels': labels.FloatingPage,
|
||||||
'inline-labels': InlinePage,
|
'inline-labels': labels.InlinePage,
|
||||||
'inset-labels': InsetPage,
|
'inset-labels': labels.InsetPage,
|
||||||
'placeholder-labels': PlaceholderPage,
|
'placeholder-labels': labels.PlaceholderPage,
|
||||||
'stacked-labels': StackedPage,
|
'stacked-labels': labels.StackedPage,
|
||||||
|
|
||||||
'icons': IconsPage,
|
'icons': icons.BasicPage,
|
||||||
|
|
||||||
'lists': BasicListsPage,
|
'lists': BasicListsPage,
|
||||||
'avatar-list': AvatarListsPage,
|
'avatar-list': AvatarListsPage,
|
||||||
|
13
demos/component-docs/icons/basic/pages.ts
Normal file
13
demos/component-docs/icons/basic/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'icons/basic/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class BasicPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,13 +1 @@
|
|||||||
import {Page} from 'ionic/ionic';
|
export * from './basic/pages';
|
||||||
import {forwardRef} from 'angular2/angular2';
|
|
||||||
import {AndroidAttribute} from '../helpers';
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'icons/icons.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class IconsPage {
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {App, IonicApp, Platform, ActionSheet} from 'ionic/ionic';
|
import {App, IonicApp, Platform, ActionSheet} from 'ionic/ionic';
|
||||||
import {Page, Config, Events} from 'ionic/ionic';
|
import {Page, Config, Events} from 'ionic/ionic';
|
||||||
import {PageOne, PageTwo, PageThree} from './menus/menus';
|
import {PageOne, PageTwo, PageThree} from './menus/menus';
|
||||||
import {ActionSheetPage} from './actionSheet/actionSheet';
|
import * as actionSheets from './action-sheets/action-sheets';
|
||||||
import * as helpers from './helpers';
|
import * as helpers from './helpers';
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class DemoApp {
|
|||||||
if (data.hash) {
|
if (data.hash) {
|
||||||
this.nextPage = helpers.getPageFor(data.hash.replace('#', ''));
|
this.nextPage = helpers.getPageFor(data.hash.replace('#', ''));
|
||||||
} else {
|
} else {
|
||||||
this.nextPage = ActionSheetPage;
|
this.nextPage = actionSheets.BasicPage;
|
||||||
}
|
}
|
||||||
let nav = this.app.getComponent('nav');
|
let nav = this.app.getComponent('nav');
|
||||||
nav.setRoot(this.nextPage);
|
nav.setRoot(this.nextPage);
|
||||||
|
12
demos/component-docs/inputs/checkbox/pages.ts
Normal file
12
demos/component-docs/inputs/checkbox/pages.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'inputs/checkbox/template.html',
|
||||||
|
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class CheckboxPage{
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
@ -1,48 +1,5 @@
|
|||||||
import {App, IonicApp, Page} from 'ionic/ionic';
|
export * from './checkbox/pages';
|
||||||
import {forwardRef} from 'angular2/angular2';
|
export * from './radio/pages';
|
||||||
import * as helpers from '../helpers';
|
export * from './range/pages';
|
||||||
|
export * from './select/pages';
|
||||||
@Page({
|
export * from './switch/pages';
|
||||||
templateUrl: 'inputs/checkbox.html',
|
|
||||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class CheckboxPage{
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'inputs/radio.html',
|
|
||||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class RadioPage{
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'inputs/range.html',
|
|
||||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class RangePage{
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'inputs/select.html',
|
|
||||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class SelectPage{
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'inputs/switch.html',
|
|
||||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class SwitchPage{
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
12
demos/component-docs/inputs/radio/pages.ts
Normal file
12
demos/component-docs/inputs/radio/pages.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {App, IonicApp, Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import * as helpers from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'inputs/radio/template.html',
|
||||||
|
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class RadioPage {
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
12
demos/component-docs/inputs/range/pages.ts
Normal file
12
demos/component-docs/inputs/range/pages.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'inputs/range/template.html',
|
||||||
|
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class RangePage{
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
12
demos/component-docs/inputs/select/pages.ts
Normal file
12
demos/component-docs/inputs/select/pages.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'inputs/select/template.html',
|
||||||
|
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class SelectPage{
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
12
demos/component-docs/inputs/switch/pages.ts
Normal file
12
demos/component-docs/inputs/switch/pages.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'inputs/switch/template.html',
|
||||||
|
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class SwitchPage{
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
24
demos/component-docs/labels/basic/pages.ts
Normal file
24
demos/component-docs/labels/basic/pages.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import {FORM_DIRECTIVES, FormBuilder, forwardRef, Validators, Control, ControlGroup} from 'angular2/angular2';
|
||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/basic/template.html',
|
||||||
|
providers: [FormBuilder],
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class BasicPage {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.form = new ControlGroup({
|
||||||
|
firstName: new Control("", Validators.required),
|
||||||
|
lastName: new Control("", Validators.required)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
processForm(event) {
|
||||||
|
// TODO: display input in a popup
|
||||||
|
console.log(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
13
demos/component-docs/labels/fixed-inline/pages.ts
Normal file
13
demos/component-docs/labels/fixed-inline/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/fixed-inline/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class FixedInlinePage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/labels/floating/pages.ts
Normal file
13
demos/component-docs/labels/floating/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/floating/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class FloatingPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/labels/inline/pages.ts
Normal file
13
demos/component-docs/labels/inline/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/inline/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class InlinePage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/labels/inset/pages.ts
Normal file
13
demos/component-docs/labels/inset/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/inset/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class InsetPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
7
demos/component-docs/labels/labels.ts
Normal file
7
demos/component-docs/labels/labels.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export * from './basic/pages';
|
||||||
|
export * from './fixed-inline/pages';
|
||||||
|
export * from './floating/pages';
|
||||||
|
export * from './inline/pages';
|
||||||
|
export * from './inset/pages';
|
||||||
|
export * from './placeholder/pages';
|
||||||
|
export * from './stacked/pages';
|
13
demos/component-docs/labels/placeholder/pages.ts
Normal file
13
demos/component-docs/labels/placeholder/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/placeholder/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class PlaceholderPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/labels/stacked/pages.ts
Normal file
13
demos/component-docs/labels/stacked/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'labels/stacked/template.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class StackedPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user