Created
September 7, 2018 10:45
-
-
Save dpalou/74a86547f1a69430c6c326e6b329bf43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var that = this; | |
this.myForm = this.FormBuilder.group({ | |
username: ["", this.Validators.required], | |
password: ["", this.Validators.required], | |
bio: ["", this.Validators.required], | |
}); | |
this.create = function() { | |
console.log("VALUES", that.myForm.valid, that.myForm.value); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{=<% %>=}} | |
<form ion-list [formGroup]="myForm" (ngSubmit)="create()"> | |
<ion-item text-wrap> | |
<ion-label stacked core-mark-required="true">{{ 'core.login.username' | translate }}</ion-label> | |
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}" formControlName="username" autocapitalize="none" autocorrect="off"></ion-input> | |
<core-input-errors item-content [control]="myForm.controls.username"></core-input-errors> | |
</ion-item> | |
<ion-item text-wrap> | |
<ion-label stacked core-mark-required="true">{{ 'core.login.password' | translate }}</ion-label> | |
<core-show-password item-content [name]="'password'"> | |
<ion-input type="password" name="password" placeholder="{{ 'core.login.password' | translate }}" formControlName="password" [clearOnEdit]="false"></ion-input> | |
</core-show-password> | |
<core-input-errors item-content [control]="myForm.controls.password"></core-input-errors> | |
</ion-item> | |
<ion-item text-wrap> | |
<ion-label stacked> | |
<span core-mark-required="true">Bio</span> | |
<core-input-errors [control]="myForm.controls.bio"></core-input-errors> | |
</ion-label> | |
<core-rich-text-editor item-content [control]="myForm.controls.bio"></core-rich-text-editor> | |
</ion-item> | |
<ion-item padding> | |
<button ion-button block color="primary" type="submit">{{ 'core.login.createaccount' | translate }}</button> | |
</ion-item> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment