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
    }
Example #3
0
 requestResetPassword() {
     this.activeModal.dismiss('to state requestReset');
     this.router.navigate(['/reset', 'request']);
 }
Example #4
0
 home() {
   this.router.navigate(['']);
 }
Example #5
0
 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]);
 }
Example #11
0
 gotoDetail(cluster: Cluster) {
   let link = ['/cluster', cluster.id];
   this.router.navigate(link);
 }
   .do(authenticated => {
 if 
   (!authenticated) this.router.navigate([ '/login' ]);
 })
 .then(() => this.router.navigate(['/']),
 canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
   if (this.auth.authenticated) return true;
   this.router.navigate(['/']);
   return false;
 }
Example #15
0
 this.authService.logout(() => {
   this.router.navigate(['/login']);
 });
 onCancel(){
   this._router.navigate(['config/transmission']);
 }
 .do(unauthenticated => {
   if (!unauthenticated) {
     this.router.navigate(['/tasks']);
   }
 });
 gotoDetail() {
     this.router.navigate(['ProviderDetail', { id: this.selectedProvider.id }]);
 }
 public onNavigationItemTap(args: ItemEventData) {
     const itemIndex = args.index;
     const tappedItem = this._currentExample.subItems[itemIndex];
     this._router.navigateByUrl(tappedItem.path);
 }
	ngOnInit() {
		this.router.navigate(['/home']);

	}
  // #enddocregion ngOnInit

  // #docregion gotoHeroes
  gotoHeroes() {
    this.router.navigate(['/heroes']);
  }
 addNew() {
     let link = ['/tasks', 'new', { projectId: this.project.id }];
     this.router.navigate(link);
 }
Example #23
0
 customers() {
   this.router.navigate(['customers']);
 }
 gotoDetail(task: Task): void {
     let link = ['/tasks', task.id, { projectId: this.project.id }];
     this.router.navigate(link);
 }
Example #25
0
 }, (reason) => {
     this.router.navigate([{ outlets: { popup: null }}], { replaceUrl: true });
     this.ngbModalRef = null;
 });
 goToAddUser(): void {
     this.router.navigate(['/setup-index/user']);
 }
Example #27
0
 register() {
     this.activeModal.dismiss('to state register');
     this.router.navigate(['/register']);
 }
 onLogoutClick() {
   this.authService.logout();
   this.flashMessage.show('logout success', { cssClass: 'alert-success', timeout: 2000 });
   this.router.navigateByUrl('login');    
   return false;
 }
Example #29
0
 .map(authState => {
   if (!authState) this._router.navigate(['/auth']);
   return !!authState;
 }).take(1)
 edit(intent) {
   this._router.navigate(["/agent/default/edit-intent", intent._id.$oid])
 }