Guest User

Untitled

a guest
Jan 6th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import * as Parse from 'parse';
  3.  
  4. @Component({
  5. selector: 'app-login',
  6. templateUrl: './login.component.html',
  7. styleUrls: ['./login.component.styl']
  8. })
  9. export class LoginComponent implements OnInit {
  10. currentUser:void|Parse.User;
  11. userName = '';
  12. userPassword = '';
  13.  
  14. async onSubmit(e) {
  15. e.preventDefault();
  16. this.currentUser = await Parse.User.logIn(this.userName, this.userPassword).catch(e => console.log('login failed', e));
  17.  
  18. }
  19.  
  20. constructor() { }
  21.  
  22. ngOnInit() {
  23. }
  24.  
  25. }
Add Comment
Please, Sign In to add comment