Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import { Injectable } from "@angular/core";
import { CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot } from "@angular/router";
import { Observable } from "rxjs/Observable";
import { Observer } from "rxjs/Observer";
import { BaseComponent } from "../base/base.component";
export class InputPageCanDeactivatedGuard<T extends BaseComponent> implements CanDeactivate<T>{
component: T,
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean> | Promise<boolean> | boolean {
return component.canDeActivateInputPage();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment