facultymatt / angular-unsavedChanges

angular-unsavedChanges
175 stars 81 forks source link

Do not set form to $pristine state while HTTP call is in progress. #48

Closed awerlang closed 6 years ago

awerlang commented 9 years ago

For instance, I want to inspect the HTTP response to determine if form was successfully saved. In case of error, I don't want to loose data if user simply navigates away.

I believe there should be an option to allow programmers decide to call $setPristine themselves.

Source: https://github.com/facultymatt/angular-unsavedChanges/blob/develop/src/unsavedChanges.js#L268