Last active
July 22, 2017 13:11
-
-
Save masterk63/3f0b59a0d0570ccbd384422da1ea2645 to your computer and use it in GitHub Desktop.
Evitar que sierra la pestaña
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HostListener } from '@angular/core'; | |
// export class hola { | |
@HostListener('window:beforeunload', ['$event']) | |
doSomething($event) { | |
if(true) $event.returnValue='Perderas la informacion!'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment