Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var output=this.loginService.IsLogin(Username, Password).subscribe();
- var output=this.loginService.IsLogin(Username, Password).subscribe();
- if (output == true) {
- this.router.navigate(['/incidentSupport'])
- }
- else if (userName.trim() == "" && password.trim() == "")
- {
- this.msg = "Please enter the username or Password"
- }
- else
- {
- this.msg = "Invalid username or password"
- }
- fetchList(start: string, end: string): Observable<Object> {
- return this.http.get(URL)
- }
- this.loginService.IsLogin(Username, Password).subscribe((resp: any) => {
- // This assumes that your API directly returns a boolean
- if(output) {
- this.router.navigate(['/incidentSupport']);
- }
- else if(userName.trim() == "" && password.trim() == "") {
- this.msg = "Please enter the username or Password"
- }
- else {
- this.msg = "Invalid username or password"
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement