Comments (4)
Can you post how you are loading data. Form dirty normally doesn't get set unless you are triggering user events.
from angular-unsavedchanges.
Basically making a call to an HTTP service, which returns an object (in a predetermined format), and then I bind that object to scope in a controller. The UI template uses this controller, and I'm using 'ng-model' (on the $scope object properties) to display the object properties in the UI
EDIT: After I load the controller/template with the form, the log states 'all forms are clean'. However, when I try to click another object (which loads a new form), I then get a log message stating 'a form is dirty', even after I've made 0 clicks on the UI (aside from opening up a new form).
from angular-unsavedchanges.
It seems like $pristine() is called after the directive loads, but before the HTTP call has finished.
from angular-unsavedchanges.
Make sure your form is in $pristine state while it is loading data. Perhaps a specific control your are using is setting your form as $dirty.
It may help to pinpoint the exact source of error if you put a breakpoint on $setDirty() to see who is calling that.
from angular-unsavedchanges.
Related Issues (20)
- Do not set form to $pristine state while HTTP call is in progress.
- ngTable Coloumn Customization HOT 3
- unsaved-warning-clear doesn't work with other directives asking for new/isolated scope
- Confirm Box is Displaying [Object,Object] HOT 1
- Add support for working with angular-input-modified
- Add support for usage within Modal Dialogs
- Use onunload in IE 9 instead of onbeforeunload HOT 1
- Warning alert shows up twice HOT 6
- Looking to disable the directive based on condition
- Upload to NPM HOT 1
- Anyone using angular-gettext? HOT 3
- How can I use it for RequireJS
- Project status - abandoned? HOT 4
- This doesn't seem to be injecting properly with angular 1.5.x
- Ipad bug
- Exclude Warning Messages to Specific Routes (Server route)
- Not injecting properly for deploy
- Not working on refresh
- Not working with upload file
- Does it support the version 1 of ui-router?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-unsavedchanges.