angular-unsavedChanges icon indicating copy to clipboard operation
angular-unsavedChanges copied to clipboard

Confirm dialog appears twice

Open rmariuzzo opened this issue 11 years ago • 3 comments

When using Angular UI Router, the angular-unsavedChanges module display the confirm box twice, because two events are being watched: $locationChangeStart and $stateChangeStart.

screenshot from 2014-11-19 21 28 36

Did I'm missing something or is it a bug?

rmariuzzo avatar Nov 20 '14 01:11 rmariuzzo

@facultymatt, looks like I needed to tune up the default configuration: https://github.com/facultymatt/angular-unsavedChanges#routeevent

rmariuzzo avatar Nov 20 '14 01:11 rmariuzzo

How did you tune it? What is the new config?

facultymatt avatar Nov 20 '14 04:11 facultymatt

Had the same problem. unsavedWarningsConfigProvider.routeEvent = '$stateChangeStart'; in config helped.

smajl avatar Nov 28 '14 14:11 smajl