Advertisement
Guest User

Untitled

a guest
Nov 8th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. login(){
  2.  
  3. //if(this.username==this.uname && this.password==this.pwd){
  4. this.loginHttpService.login(this.username,this.password).subscribe((registered:IRegister[])=>{
  5. if(registered.length==1){
  6. alert("Login Successfull!!");
  7. this._router.navigate(['/account']);
  8. }
  9.  
  10.  
  11.  
  12. else if(this.username==null && this.password==null){
  13. alert("Please fill the credintials");
  14. }
  15. else if(this.username==null && this.password==this.pwd){
  16. alert("Please enter the username");
  17. }
  18. else if(this.username==this.uname && this.password==null){
  19. alert("Please enter the password");
  20. }
  21.  
  22. else{
  23. alert("Invalid Login");
  24. }
  25. })
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement