49 lines
923 B
TypeScript
49 lines
923 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
import {Router} from '@angular/router';
|
|
import {MenuItem} from 'primeng/primeng';
|
|
declare const gapi: any;
|
|
|
|
declare function simple_notifier(type: string, title: string, message:string): any;
|
|
|
|
@Component({
|
|
selector: 'app-main-sign-in',
|
|
templateUrl: './main-sign-in.component.html',
|
|
styleUrls: ['./main-sign-in.component.css']
|
|
})
|
|
export class MainSignInComponent implements OnInit {
|
|
|
|
|
|
nativeLoginForm : any;
|
|
|
|
creds : any = {"username":"","password":""};
|
|
|
|
|
|
constructor( private fb: FormBuilder, private router : Router) {
|
|
|
|
}
|
|
|
|
|
|
createForm(){
|
|
|
|
this.nativeLoginForm = this.fb.group({
|
|
username: ['', Validators.required ],
|
|
password: ['', Validators.required ]
|
|
});
|
|
|
|
}
|
|
|
|
|
|
ngOnInit() {
|
|
this.createForm();
|
|
}
|
|
|
|
|
|
login(){
|
|
//login using the credentials
|
|
|
|
|
|
}
|
|
|
|
}
|