mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
Rollback raw thing
This commit is contained in:
@ -2,14 +2,15 @@
|
|||||||
import {For, Component, View, Parent, bootstrap} from 'angular2/angular2'
|
import {For, Component, View, Parent, bootstrap} from 'angular2/angular2'
|
||||||
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
||||||
import {Log} from 'ionic/util'
|
import {Log} from 'ionic/util'
|
||||||
import {Router, List, Item, Nav ,NavController, Button, Input, Tabs, Tab, Content, Aside} from 'ionic/ionic'
|
import {Router, List, Item, Nav, NavController, Toolbar, ToolbarTitle,
|
||||||
|
Button, Input, Tabs, Tab, Content, Aside} from 'ionic/ionic'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'login-page'
|
selector: 'login-page'
|
||||||
})
|
})
|
||||||
@View({
|
@View({
|
||||||
templateUrl: 'pages/login.html',
|
templateUrl: 'pages/login.html',
|
||||||
directives: [FormDirectives, Button, Input]
|
directives: [FormDirectives, Button, Input, Content, Toolbar, ToolbarTitle]
|
||||||
})
|
})
|
||||||
export class LoginPage {
|
export class LoginPage {
|
||||||
constructor( @Parent() viewport: NavController ) { //, fb: FormBuilder ) {
|
constructor( @Parent() viewport: NavController ) { //, fb: FormBuilder ) {
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
<div>
|
<header *ion-toolbar>
|
||||||
|
<h1 class="toolbar-title">
|
||||||
|
Login
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
|
<ion-content class="padding">
|
||||||
<form (^submit)="doLogin($event)" [control-group]="loginForm">
|
<form (^submit)="doLogin($event)" [control-group]="loginForm">
|
||||||
<ion-input>
|
<ion-input>
|
||||||
<input control="email" type="email" placeholder="Your email">
|
<input control="email" type="email" placeholder="Your email">
|
||||||
@ -11,4 +16,4 @@
|
|||||||
<button ion-button primary block (click)="doSignup()">Create an account</button>
|
<button ion-button primary block (click)="doSignup()">Create an account</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</ion-content>
|
||||||
|
@ -59,12 +59,15 @@ export class IonicComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: This worked fine for property-only buttons, but breaks with
|
||||||
|
// class, etc.
|
||||||
|
//
|
||||||
// If we want to enhance a raw element (for example, a button),
|
// If we want to enhance a raw element (for example, a button),
|
||||||
// only do it if we also have a matching prop class
|
// only do it if we also have a matching prop class
|
||||||
if(!foundMatchingPropClass && this.enhanceRawElement) {
|
//if(!foundMatchingPropClass && this.enhanceRawElement) {
|
||||||
// Don't enhace this raw element
|
// Don't enhace this raw element
|
||||||
return;
|
//return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Add the base element classes (ex, button and button-ios)
|
// Add the base element classes (ex, button and button-ios)
|
||||||
dom.addClasses(instance.domElement, this.componentCssName, `${this.componentCssName}-${platformMode}`);
|
dom.addClasses(instance.domElement, this.componentCssName, `${this.componentCssName}-${platformMode}`);
|
||||||
|
Reference in New Issue
Block a user