- Form fixes
This commit is contained in:
@@ -28,6 +28,6 @@
|
|||||||
<ion-label>Your schtick with #gays</ion-label>
|
<ion-label>Your schtick with #gays</ion-label>
|
||||||
<ion-textarea formControlName="messages" name="messages"></ion-textarea>
|
<ion-textarea formControlName="messages" name="messages"></ion-textarea>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<button ion-button type="submit" block [disabled]="!userSubmissionForm.valid" (click)="saveUserSubmission()">Submit</button>
|
<button ion-button type="submit" block (click)="saveUserSubmission()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NavController } from 'ionic-angular';
|
import { NavController } from 'ionic-angular';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
|
||||||
import { ProfileService } from '../../services/profiles';
|
import { ProfileService } from '../../services/profiles';
|
||||||
|
|
||||||
@@ -14,14 +14,14 @@ export class TellYourStoryPage {
|
|||||||
tabNavEl: any;
|
tabNavEl: any;
|
||||||
userSubmissionForm: FormGroup;
|
userSubmissionForm: FormGroup;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, private formBuilder: FormBuilder, private validators: Validators) {
|
constructor(public navCtrl: NavController, private formBuilder: FormBuilder) {
|
||||||
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
||||||
|
|
||||||
this.userSubmissionForm = this.formBuilder.group({
|
this.userSubmissionForm = this.formBuilder.group({
|
||||||
name: ['', [ validators.required ] ],
|
name: [''],
|
||||||
about: ['', [ validators.required ] ],
|
about: [''],
|
||||||
pic: ['', [ validators.required ] ],
|
pic: [''],
|
||||||
messages: ['', [ validators.required ] ]
|
messages: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user