Skip to content

Instantly share code, notes, and snippets.

@shamique
Last active October 17, 2018 11:04
Show Gist options
  • Save shamique/4044d5ec59c5f3415c8b1d71bb18e86f to your computer and use it in GitHub Desktop.
Save shamique/4044d5ec59c5f3415c8b1d71bb18e86f to your computer and use it in GitHub Desktop.
import { Component } from "@angular/core";
import { CognitoServiceProvider } from "../../providers/cognito-service/cognito-service";
import { SignUpPage } from "../../pages/sign-up/sign-up";
@Component({
selector: "page-login",
templateUrl: "login.html"
})
export class LoginPage {
email: string;
password: string;
signUpPage = SignUpPage;
constructor(public CognitoSerive:CognitoServiceProvider) {
}
login(){
this.CognitoSerive.authenticate(this.email, this.password)
.then(res =>{
console.log(res);
}, err =>{
console.log(err);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment