Skip to content

67 register backend functionality and updates#99

Merged
khoadnguyen merged 5 commits intodevfrom
67-register-backend-functionality-and-updates
Oct 9, 2018
Merged

67 register backend functionality and updates#99
khoadnguyen merged 5 commits intodevfrom
67-register-backend-functionality-and-updates

Conversation

@jthk1106
Copy link
Copy Markdown
Contributor

@jthk1106 jthk1106 commented Oct 8, 2018

Input validators are functional, backend register is successful, navigation added to register and login buttons.

@jthk1106 jthk1106 added the code review This PR is ready for code review label Oct 8, 2018
@jthk1106 jthk1106 added this to the Week 4 milestone Oct 8, 2018
@jthk1106 jthk1106 self-assigned this Oct 8, 2018
@jthk1106 jthk1106 requested a review from khoadnguyen October 8, 2018 10:16
</ion-item>

<button id="register-button"color="secondary" ion-button [disabled]="!validate.valid">REGISTER </button>
<button id="register-button"color="secondary" ion-button [disabled]="!validate.valid" type="submit">REGISTER</button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like the disabled functionality when the form is not valid. Let's re-emphasize in class this design pattern & explain its usefulness.

submitAttempt: boolean = false;

constructor(public navCtrl: NavController, public navParams: NavParams, private fb: FormBuilder) {
constructor(public navCtrl: NavController, public navParams: NavParams, private fb: FormBuilder, public _user: UserProvider) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinate with @awstin17 to have a consistent name for the _user service.

Copy link
Copy Markdown
Contributor

@khoadnguyen khoadnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, 🌜

}

regForm(){
submitReg() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use some formatting--the indenting and format look at bit off and make it harder to read.

@Injectable()
export class UserProvider {

regUrl: string = "https://j-reboot-backend.herokuapp.com/api/appUsers"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regURL seems a bit too specific for everyone's use case. Is there a better way to do this? Let's look over environment variables.

@khoadnguyen khoadnguyen merged commit c98a015 into dev Oct 9, 2018
@khoadnguyen khoadnguyen deleted the 67-register-backend-functionality-and-updates branch October 31, 2018 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code review This PR is ready for code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants