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

Method login

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

Source from the content-addressed store, hash-verified

58 }
59
60 login() {
61 if (getConnectionType() === connectionType.none) {
62 alert("Groceries requires an internet connection to log in.");
63 return;
64 }
65
66 this.userService.login(this.user)
67 .subscribe(
68 () => {
69 this.isAuthenticating = false;
70 this.router.navigate(["/"]);
71 },
72 (error) => {
73 alert("Unfortunately we could not find your account.");
74 this.isAuthenticating = false;
75 }
76 );
77 }
78
79 signUp() {
80 if (getConnectionType() === connectionType.none) {

Callers 1

submitMethod · 0.95

Calls 1

alertFunction · 0.90

Tested by

no test coverage detected