MCPcopy Create free account
hub / github.com/NativeScript/sample-Groceries / signUp

Method signUp

app/login/login.component.ts:79–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 }
78
79 signUp() {
80 if (getConnectionType() === connectionType.none) {
81 alert("Groceries requires an internet connection to register.");
82 return;
83 }
84
85 this.userService.register(this.user)
86 .subscribe(
87 () => {
88 alert("Your account was successfully created.");
89 this.isAuthenticating = false;
90 this.toggleDisplay();
91 },
92 (message) => {
93 // TODO: Verify this works
94 if (message.match(/same user/)) {
95 alert("This email address is already in use.");
96 } else {
97 alert("Unfortunately we were unable to create your account.");
98 }
99 this.isAuthenticating = false;
100 }
101 );
102 }
103
104 forgotPassword() {
105 prompt({

Callers 1

submitMethod · 0.95

Calls 3

toggleDisplayMethod · 0.95
alertFunction · 0.90
registerMethod · 0.80

Tested by

no test coverage detected