Skip to content

Instantly share code, notes, and snippets.

@bipon68
Created December 7, 2022 05:30
Show Gist options
  • Select an option

  • Save bipon68/cea16ae16ebea6b2a3b52e51b9873a05 to your computer and use it in GitHub Desktop.

Select an option

Save bipon68/cea16ae16ebea6b2a3b52e51b9873a05 to your computer and use it in GitHub Desktop.
import { Router } from '@angular/router';
constructor(private _router: Router) { }
SignIn() {
this._router.navigate(["/home/dashboard"]);
console.log(">>>");
}
<button class="btn btn-primary btn-block" routerLink="/home/dashboard"><i class="fa fa-sign-in fa-lg fa-fw"></i>SIGN IN</button>
isLogggedIn = true;
constructor(
private router: Router
, private activatedRoute: ActivatedRoute,
@Inject(DOCUMENT) private document: Document) {
// console.log(document.URL);
// console.log(document.URL.split('#/')[1]);
// if(document.URL.split('#/')[1]=='login'){
// console.log("false");
// this.isLogggedIn=false;
// }else{
// this.isLogggedIn=true;
// console.log("true");
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment