Rollback raw thing

This commit is contained in:
Max Lynch
2015-05-04 16:05:55 -05:00
parent 29c94bb403
commit f314d44b90
3 changed files with 16 additions and 7 deletions

View File

@ -2,14 +2,15 @@
import {For, Component, View, Parent, bootstrap} from 'angular2/angular2'
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
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({
selector: 'login-page'
})
@View({
templateUrl: 'pages/login.html',
directives: [FormDirectives, Button, Input]
directives: [FormDirectives, Button, Input, Content, Toolbar, ToolbarTitle]
})
export class LoginPage {
constructor( @Parent() viewport: NavController ) { //, fb: FormBuilder ) {

View File

@ -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">
<ion-input>
<input control="email" type="email" placeholder="Your email">
@ -11,4 +16,4 @@
<button ion-button primary block (click)="doSignup()">Create an account</button>
</div>
</form>
</div>
</ion-content>

View File

@ -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),
// 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
return;
}
//return;
//}
// Add the base element classes (ex, button and button-ios)
dom.addClasses(instance.domElement, this.componentCssName, `${this.componentCssName}-${platformMode}`);