import { Injectable } from '@angular/core' ; import { CanDeactivate } from '@angular/router' ; import { DevicePage } from 'src/app/core/device/device.page' ; @ Injectable ( { providedIn : 'root' } ) export class LayouterGuard implements CanDeactivate < DevicePage > { canDeactivate ( component ) { return component . canDeactivate ( ) ; } }