From d260324b29fc7aabb03ce95f1b6eca6ae8d48fd1 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Sun, 15 Mar 2020 13:34:28 -0600 Subject: [PATCH 1/8] added email data point to the 'im returning' form, and made necessary changes to the handling of said data --- src/app/_services/user.service.ts | 4 +-- .../returning-user/returning-user.page.html | 6 ++-- src/app/returning-user/returning-user.page.ts | 33 +++++++++++-------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index ac20050..b68f726 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -65,8 +65,8 @@ export class UserService { return rtn; } - getUserByEmailOrPhone(query) { - let url = environment.apiUrl + "/api/user?q=" + query; + getUserByEmailAndPhone(query) { + let url = environment.apiUrl + `/api/user?email=${query.email}&phone=${query.phone}`; let rtn = new Promise( (resolve, reject) => { diff --git a/src/app/returning-user/returning-user.page.html b/src/app/returning-user/returning-user.page.html index dc84228..f4ee05e 100644 --- a/src/app/returning-user/returning-user.page.html +++ b/src/app/returning-user/returning-user.page.html @@ -15,8 +15,10 @@

- Phone (only digits, no symbols) or Email - + Phone (only digits, no symbols) + + Email + Find Me diff --git a/src/app/returning-user/returning-user.page.ts b/src/app/returning-user/returning-user.page.ts index cc8a3fc..f31a31e 100644 --- a/src/app/returning-user/returning-user.page.ts +++ b/src/app/returning-user/returning-user.page.ts @@ -12,7 +12,10 @@ import { UserService } from '../_services/user.service'; }) export class ReturningUserPage implements OnInit { - query = undefined; + query = { + email: undefined, + phone: undefined + } constructor(private _location: Location, private _router: Router, @@ -27,29 +30,33 @@ export class ReturningUserPage implements OnInit { } onQueryChange($event) { - this.query = $event.currentTarget.value; + if ($event.currentTarget.id == "phone") { + this.query.phone = $event.currentTarget.value + } else if($event.currentTarget.id == "email") { + this.query.email = $event.currentTarget.value + } } - getQuery() { - return this.query; + getQuery(value) { + if (value == 'phone') { + return this.query.phone; + } else if(value == "email") { + return this.query.email + } } isSearchBtnEnabled() { - if (this.query) { - if (!isNaN(this.query.charAt(0) * 1)) { // if the first char is a number - return this.query.length === 10 && !isNaN(this.query); - } else { - return this.query.length >= 3; - } + if (this.query.phone && this.query.email) { + return true + } else { + return false } - - return this.query && this.query.length >= 3; } onSearchBtnClicked() { let self = this; - self._userService.getUserByEmailOrPhone(self.query).then((user) => { + self._userService.getUserByEmailAndPhone(self.query).then((user) => { if (user) { self._userService.markUserAsAttending(user["id"]).then(() => { From 13bea8756921c5d1c0b418e774d0aea12960d11b Mon Sep 17 00:00:00 2001 From: ethan375 Date: Mon, 16 Mar 2020 09:12:50 -0600 Subject: [PATCH 2/8] id on the email input for signin changed --- src/app/returning-user/returning-user.page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/returning-user/returning-user.page.html b/src/app/returning-user/returning-user.page.html index f4ee05e..203c8e6 100644 --- a/src/app/returning-user/returning-user.page.html +++ b/src/app/returning-user/returning-user.page.html @@ -18,7 +18,7 @@ Phone (only digits, no symbols) Email - + Find Me From 2d1ce6a35f321956b0c8ae727a17965cab42de72 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Mon, 16 Mar 2020 22:15:43 -0600 Subject: [PATCH 3/8] package-lock updated --- package-lock.json | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index df64281..7523035 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12552,7 +12552,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -12595,7 +12596,8 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", @@ -12606,7 +12608,8 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -12723,7 +12726,8 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -12735,6 +12739,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -12764,6 +12769,7 @@ "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -12782,6 +12788,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -12884,6 +12891,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -12969,7 +12977,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -13005,6 +13014,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -13024,6 +13034,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -13067,12 +13078,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -13598,6 +13611,7 @@ "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -13616,6 +13630,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -13718,6 +13733,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -13803,7 +13819,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -13903,12 +13920,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, From c74ae4dbb0bc26d3c3e668cece567fe6ce1a3271 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Fri, 20 Mar 2020 11:51:29 -0600 Subject: [PATCH 4/8] changed returning user api function --- src/app/new-user/new-user.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/new-user/new-user.page.ts b/src/app/new-user/new-user.page.ts index 2d90c5f..a463c1b 100644 --- a/src/app/new-user/new-user.page.ts +++ b/src/app/new-user/new-user.page.ts @@ -175,7 +175,7 @@ export class NewUserPage implements OnInit { this.query = this.phone; } - self._userService.getUserByEmailOrPhone(self.query).then((user) => { + self._userService.getUserByEmailAndPhone(self.query).then((user) => { console.log("new user submit:", user); if (user) { console.log('returning user:', user); From 8ddff491e04062f9d667eb6e798b0bfec405b377 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Sun, 22 Mar 2020 12:30:57 -0600 Subject: [PATCH 5/8] made some cypress tests for the new returning user functionality --- cypress/integration/returning-user.spec.js | 45 +++++++++++++++++++ .../returning-user/returning-user.page.html | 4 +- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 cypress/integration/returning-user.spec.js diff --git a/cypress/integration/returning-user.spec.js b/cypress/integration/returning-user.spec.js new file mode 100644 index 0000000..49276d0 --- /dev/null +++ b/cypress/integration/returning-user.spec.js @@ -0,0 +1,45 @@ +import { createYield } from "typescript" + +context('go back to home after opening return user', () => { + it("will go back to the homepage", () => { + cy.visit("localhost:8100/returning-user") + + cy.contains('Cancel').click() + cy.url().should('be', 'localhost:8100/home') + }) +}) + +context('sign in for for returning users', ()=> { + it("exsisting user is found", ()=> { + cy.visit('localhost:8100/returning-user'); + cy.get('#phone') + .type('7089900326') + .should("have.value", "7089900326"); + + cy.get('#email') + .type('ethan@ethan.com') + .should('have.value', 'ethan@ethan.com'); + + cy.contains('Find Me').click() + + cy.get('.alert-wrapper').should("be.visible").contains("Found you") + }) +}) + +context("user not in the system", () =>{ + it("shows user not found would you like to sign up?", ()=> { + cy.visit("localhost:8100/returning-user") + + cy.get("#phone") + .type("78945645123") + .should('have.value', '78945645123') + + cy.get("#email") + .type("fake@fake.com") + .should("have.value", "fake@fake.com") + + cy.contains("Find Me").click() + + cy.get('.alert-wrapper').should("be.visible").contains("couldn't find a profile") + }) +}) diff --git a/src/app/returning-user/returning-user.page.html b/src/app/returning-user/returning-user.page.html index 203c8e6..2437ab2 100644 --- a/src/app/returning-user/returning-user.page.html +++ b/src/app/returning-user/returning-user.page.html @@ -16,9 +16,9 @@ Phone (only digits, no symbols) - + Email - + Find Me From 8ebcc3614086e304291347e25acf3fac67680738 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Sun, 29 Mar 2020 12:24:09 -0600 Subject: [PATCH 6/8] returning user can enter in phone OR email --- src/app/_services/user.service.ts | 4 ++-- src/app/new-user/new-user.page.ts | 2 +- src/app/returning-user/returning-user.page.ts | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index b68f726..70df144 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -65,8 +65,8 @@ export class UserService { return rtn; } - getUserByEmailAndPhone(query) { - let url = environment.apiUrl + `/api/user?email=${query.email}&phone=${query.phone}`; + getUserByEmailOrPhone(query) { + let url = environment.apiUrl + `/api/user?q=${query}`; let rtn = new Promise( (resolve, reject) => { diff --git a/src/app/new-user/new-user.page.ts b/src/app/new-user/new-user.page.ts index a463c1b..2d90c5f 100644 --- a/src/app/new-user/new-user.page.ts +++ b/src/app/new-user/new-user.page.ts @@ -175,7 +175,7 @@ export class NewUserPage implements OnInit { this.query = this.phone; } - self._userService.getUserByEmailAndPhone(self.query).then((user) => { + self._userService.getUserByEmailOrPhone(self.query).then((user) => { console.log("new user submit:", user); if (user) { console.log('returning user:', user); diff --git a/src/app/returning-user/returning-user.page.ts b/src/app/returning-user/returning-user.page.ts index f31a31e..95a6168 100644 --- a/src/app/returning-user/returning-user.page.ts +++ b/src/app/returning-user/returning-user.page.ts @@ -4,6 +4,7 @@ import { Location } from '@angular/common'; import { AlertService } from '../_services/alert.service'; import { UserService } from '../_services/user.service'; +import { ThrowStmt } from '@angular/compiler'; @Component({ selector: 'app-returning-user', @@ -13,8 +14,8 @@ import { UserService } from '../_services/user.service'; export class ReturningUserPage implements OnInit { query = { - email: undefined, - phone: undefined + phone: undefined, + email: undefined } constructor(private _location: Location, @@ -46,7 +47,7 @@ export class ReturningUserPage implements OnInit { } isSearchBtnEnabled() { - if (this.query.phone && this.query.email) { + if (this.query.email || this.query.phone){ return true } else { return false @@ -55,8 +56,15 @@ export class ReturningUserPage implements OnInit { onSearchBtnClicked() { let self = this; + let data = undefined; - self._userService.getUserByEmailAndPhone(self.query).then((user) => { + if (self.query.email) { + data = self.query.email + } else { + data = self.query.phone + } + + self._userService.getUserByEmailOrPhone(data).then((user) => { if (user) { self._userService.markUserAsAttending(user["id"]).then(() => { From 5135f8fb600d7b73e2b464b4d6a8bf6c575ee5ce Mon Sep 17 00:00:00 2001 From: ethan375 Date: Wed, 1 Apr 2020 10:30:27 -0600 Subject: [PATCH 7/8] commiting, cardinal sin. made changes according to feedback, as well as copying email validation work from brayden --- cypress/integration/returning-user.spec.js | 14 ++-- src/app/_services/user.service.ts | 2 +- src/app/returning-user/country-phone.model.ts | 33 ++++++++ .../returning-user/returning-user.page.html | 7 +- src/app/returning-user/returning-user.page.ts | 77 ++++++++++++++++++- 5 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 src/app/returning-user/country-phone.model.ts diff --git a/cypress/integration/returning-user.spec.js b/cypress/integration/returning-user.spec.js index 49276d0..7f64c9b 100644 --- a/cypress/integration/returning-user.spec.js +++ b/cypress/integration/returning-user.spec.js @@ -12,12 +12,12 @@ context('go back to home after opening return user', () => { context('sign in for for returning users', ()=> { it("exsisting user is found", ()=> { cy.visit('localhost:8100/returning-user'); - cy.get('#phone') - .type('7089900326') - .should("have.value", "7089900326"); + cy.get('[data-test="return-user-phone-input"]') + .type('3035551212') + .should("have.value", "3035551212"); - cy.get('#email') - .type('ethan@ethan.com') + cy.get('[data-test="return-user-email-input"]') + .type('dave@dave.com') .should('have.value', 'ethan@ethan.com'); cy.contains('Find Me').click() @@ -30,11 +30,11 @@ context("user not in the system", () =>{ it("shows user not found would you like to sign up?", ()=> { cy.visit("localhost:8100/returning-user") - cy.get("#phone") + cy.get('[data-test="return-user-phone-input"]') .type("78945645123") .should('have.value', '78945645123') - cy.get("#email") + cy.get('[data-test="return-user-email-input"]') .type("fake@fake.com") .should("have.value", "fake@fake.com") diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index 70df144..54a4767 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -66,7 +66,7 @@ export class UserService { } getUserByEmailOrPhone(query) { - let url = environment.apiUrl + `/api/user?q=${query}`; + let url = environment.apiUrl + "/api/user?q=" + query; let rtn = new Promise( (resolve, reject) => { diff --git a/src/app/returning-user/country-phone.model.ts b/src/app/returning-user/country-phone.model.ts new file mode 100644 index 0000000..00c6549 --- /dev/null +++ b/src/app/returning-user/country-phone.model.ts @@ -0,0 +1,33 @@ +import libphonenumber from 'google-libphonenumber'; + +export class CountryPhone { + iso: string; + name: string; + code: string; + sample_phone: string; + + constructor (iso: string, name: string) { + this.iso = iso; + this.name = name; + + let phoneUtil = libphonenumber.PhoneNumberUtil.getInstance(), + PNF = libphonenumber.PhoneNumberFormat, + PNT = libphonenumber.PhoneNumberType, + country_example_number = phoneUtil.getExampleNumberForType(this.iso, PNT.MOBILE), + // We need to define what kind of country phone number type we are going to use as a mask. + // You can choose between many types including: + // - FIXED_LINE + // - MOBILE + // - For more types please refer to google libphonenumber repo (https://github.com/googlei18n/libphonenumber/blob/f9e9424769964ce1970c6ed2bd60b25b976dfe6f/javascript/i18n/phonenumbers/phonenumberutil.js#L913) + example_number_formatted = phoneUtil.format(country_example_number, PNF.NATIONAL); + // We need to define how are we going to format the phone number + // You can choose between many formats including: + // - NATIONAL + // - INTERNATIONAL + // - E164 + // - RFC3966 + + this.sample_phone = example_number_formatted; + this.code = "+" + country_example_number.getCountryCode(); + } +} diff --git a/src/app/returning-user/returning-user.page.html b/src/app/returning-user/returning-user.page.html index 2437ab2..d023f14 100644 --- a/src/app/returning-user/returning-user.page.html +++ b/src/app/returning-user/returning-user.page.html @@ -16,9 +16,12 @@ Phone (only digits, no symbols) - + + + + Email - + Find Me diff --git a/src/app/returning-user/returning-user.page.ts b/src/app/returning-user/returning-user.page.ts index 95a6168..1427d33 100644 --- a/src/app/returning-user/returning-user.page.ts +++ b/src/app/returning-user/returning-user.page.ts @@ -1,11 +1,16 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Location } from '@angular/common'; +import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms'; import { AlertService } from '../_services/alert.service'; import { UserService } from '../_services/user.service'; import { ThrowStmt } from '@angular/compiler'; +import { CountryPhone } from './country-phone.model'; +import { PhoneValidator } from '../validators/phone.validator'; + + @Component({ selector: 'app-returning-user', templateUrl: './returning-user.page.html', @@ -18,18 +23,84 @@ export class ReturningUserPage implements OnInit { email: undefined } + countries: Array; + validations_form: FormGroup; + country_phone_group: FormGroup; + constructor(private _location: Location, private _router: Router, private _route: ActivatedRoute, private _userService: UserService, - private _alertService: AlertService ) { + private _alertService: AlertService, + private formBuilder: FormBuilder ) { - } + } + + validation_messages = { + 'name': [ + { type: 'required', message: 'Name is required.' } + ], + 'email': [ + { type: 'required', message: 'Email is required.' }, + { type: 'pattern', message: 'Please enter a valid email, OR a ten digit phone number.' } + ], + 'phone': [ + { type: 'required', message: 'Phone is required.' }, + { type: 'validCountryPhone', message: 'Please enter a ten digit phone number, OR a valid email.' } + ] + }; ngOnInit() { - + this.countries = [ + new CountryPhone('US', 'United States') + ]; + + let country = new FormControl(this.countries[0], Validators.required); + let phone = new FormControl('', Validators.compose([ + PhoneValidator.validCountryPhone(country) + ])); + this.country_phone_group = new FormGroup({ + country: country, + phone: phone + }); + + this.validations_form = this.formBuilder.group({ + name: new FormControl('', Validators.required), + email: new FormControl('', Validators.compose([ + Validators.pattern('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9]+([\.]{1})([a-zA-Z0-9]{2,3})$') + ])), + country_phone: this.country_phone_group + }, + { + updateOn: "blur" + } + ); } + getErrorMessages() { + if((this.validations_form.controls.email.status === "VALID" && /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9]+([\.]{1})([a-zA-Z0-9]{2,3})$/.test(this.validations_form.controls.email.value)) && (this.validations_form.controls.country_phone.status === "VALID" && this.validations_form.controls.country_phone.value.phone.length === 10)) { + console.log('valid email and phone') + this.validation_messages.phone[1] = { type: 'validCountryPhone', message: 'You have entered a valid email address. Please clear this field OR provide a 10 digit phone number.' }; + this.validation_messages.email[1] = { type: 'pattern', message: 'You have entered a valid phone number. Please clear this field OR provide a valid email.' }; + } else if ((this.validations_form.controls.country_phone.status === "VALID" && this.validations_form.controls.country_phone.value.phone.toString().length === 10)) { + this.validation_messages.email[1] = { type: 'pattern', message: 'You have entered a valid phone number. Please clear this field OR provide a valid email.' }; + this.validation_messages.phone[1] = { type: 'validCountryPhone', message: 'Please enter a ten digit phone number, OR a valid email.' }; + } else if ((this.validations_form.controls.email.status === "VALID" && /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9]+([\.]{1})([a-zA-Z0-9]{2,3})$/.test(this.validations_form.controls.email.value))) { + console.log('valid email') + this.validation_messages.phone[1] = { type: 'validCountryPhone', message: 'You have entered a valid email address. Please clear this field OR provide a 10 digit phone number.' }; + this.validation_messages.email[1] = { type: 'pattern', message: 'Please enter a valid email, OR a ten digit phone number.' }; + } else if ((this.validations_form.controls.email.status === "VALID" && !(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9]+([\.]{1})([a-zA-Z0-9]{2,3})$/.test(this.validations_form.controls.email.value)))) { + console.log('invalid email with valid status'); + this.validation_messages.phone[1] = { type: 'validCountryPhone', message: 'Please enter a ten digit phone number, OR a valid email.' }; + this.validation_messages.email[1] = { type: 'pattern', message: 'Please enter a valid email, OR a ten digit phone number.' }; + } else { + this.validation_messages.phone[1] = { type: 'validCountryPhone', message: 'Please enter a ten digit phone number, OR a valid email.' }; + this.validation_messages.email[1] = { type: 'pattern', message: 'Please enter a valid email, OR a ten digit phone number.' }; + } + } + + + onQueryChange($event) { if ($event.currentTarget.id == "phone") { this.query.phone = $event.currentTarget.value From 10e356b156742aeb355ec897a17715204dcedc74 Mon Sep 17 00:00:00 2001 From: ethan375 Date: Wed, 1 Apr 2020 12:24:21 -0600 Subject: [PATCH 8/8] implementing email validation for returning user --- .../returning-user/returning-user.page.html | 24 ++++++++++--------- src/app/returning-user/returning-user.page.ts | 7 +++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/app/returning-user/returning-user.page.html b/src/app/returning-user/returning-user.page.html index d023f14..1d385c7 100644 --- a/src/app/returning-user/returning-user.page.html +++ b/src/app/returning-user/returning-user.page.html @@ -14,18 +14,20 @@ In the DTIM, our goal is to help you prepare for your next big tech interview.

- - Phone (only digits, no symbols) - - - - - Email - - +
+ + Phone (only digits, no symbols) + + + + + Email + + - Find Me - Cancel + Find Me + Cancel +
\ No newline at end of file diff --git a/src/app/returning-user/returning-user.page.ts b/src/app/returning-user/returning-user.page.ts index 1427d33..8375b90 100644 --- a/src/app/returning-user/returning-user.page.ts +++ b/src/app/returning-user/returning-user.page.ts @@ -1,11 +1,10 @@ import { Component, OnInit } from '@angular/core'; +import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms'; import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Location } from '@angular/common'; -import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms'; import { AlertService } from '../_services/alert.service'; import { UserService } from '../_services/user.service'; -import { ThrowStmt } from '@angular/compiler'; import { CountryPhone } from './country-phone.model'; import { PhoneValidator } from '../validators/phone.validator'; @@ -23,9 +22,9 @@ export class ReturningUserPage implements OnInit { email: undefined } - countries: Array; validations_form: FormGroup; - country_phone_group: FormGroup; + country_phone_group: FormGroup; + countries: Array; constructor(private _location: Location, private _router: Router,