Items 1-12 out of 19652 displayed
Any variable that you use in the useEffect
function needs to be in the dependency array, so that it is can be monitored and the useEffect will only be run when that variable...
You basically implement a handler for beforeunload
event. This allows you to warn your users that they have unsaved data.
Pseudo Code:
window.onbeforeunload...
As I said in the question comment section, route guards would be a good solution for this purpose.
The MobileGuard
would look like this :
export class...
If you need to support later browsers, i.e., IE9+, you can use the following
you can use ng-class
Define a var like $scope.started = false;
and inside you start function set it to true. On your button do this: