Last active
September 24, 2018 18:18
-
-
Save arn-ob/6b98dee552e6c893389a2dbd281e9ce1 to your computer and use it in GitHub Desktop.
For the canDeactivate blog at Medium
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
| canDeactivate() { | |
| // if the user name is not null then it will proced | |
| if ( this.user.name !== null) { | |
| return true; | |
| } else { | |
| if(confirm("Are you sure!")){ | |
| return true; | |
| }else{ | |
| return false; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment