train(intent) {
   this._router.navigate(["/agent/default/train-intent", intent._id.$oid])
 }
    canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
        if(this.authService.getCookie('token')){
            this.router.navigate(['/'])
        }
	    return true
    }
Beispiel #3
0
 requestResetPassword() {
     this.activeModal.dismiss('to state requestReset');
     this.router.navigate(['/reset', 'request']);
 }
 home() {
   this.router.navigate(['']);
 }
 products(){
   this.router.navigate(['products']);
 }
 tap(action => {
   this.router.navigate(['']);
   this.localStorageService.setItem(AUTH_KEY, { isAuthenticated: false });
 })
 ).subscribe(() => this.router.navigate([ '..' ], { relativeTo: this.route }));
 checkcredentials(){
             if(localStorage.getItem("user") === null){
                 this._router.navigate(['login']);
             }
 }
 logout(){
     localStorage.removeItem("user");
     this._router.navigate(['login']);
 }
 clicked(product: Product): void {
   this.currentProduct = product;
   this.onProductSelected.emit(product);
   this.router.navigate(['/product', product.sku]);
 }