Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login(){
- //if(this.username==this.uname && this.password==this.pwd){
- this.loginHttpService.login(this.username,this.password).subscribe((registered:IRegister[])=>{
- if(registered.length==1){
- alert("Login Successfull!!");
- this._router.navigate(['/account']);
- }
- else if(this.username==null && this.password==null){
- alert("Please fill the credintials");
- }
- else if(this.username==null && this.password==this.pwd){
- alert("Please enter the username");
- }
- else if(this.username==this.uname && this.password==null){
- alert("Please enter the password");
- }
- else{
- alert("Invalid Login");
- }
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement