Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- import * as Parse from 'parse';
- @Component({
- selector: 'app-login',
- templateUrl: './login.component.html',
- styleUrls: ['./login.component.styl']
- })
- export class LoginComponent implements OnInit {
- currentUser:void|Parse.User;
- userName = '';
- userPassword = '';
- async onSubmit(e) {
- e.preventDefault();
- this.currentUser = await Parse.User.logIn(this.userName, this.userPassword).catch(e => console.log('login failed', e));
- }
- constructor() { }
- ngOnInit() {
- }
- }
Add Comment
Please, Sign In to add comment