Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property '$$notifyModelModifiedStateChanged' of null #52

Open
pjarosak opened this issue Mar 2, 2017 · 0 comments

Comments

@pjarosak
Copy link

pjarosak commented Mar 2, 2017

I used this module in a uib-modal (https://angular-ui.github.io/bootstrap/). The data modal that is passed to the modal is reloaded prior to being opened again.

I found that adding the same checks you had in onInputValueChanges() to setPristine() fixes it.

Changing from:
// Notifying the form.
formCtrl.$$notifyModelModifiedStateChanged(modelCtrl);

to:

                    // Notifying the form.
                    if (formCtrl && 'function' === typeof formCtrl.$$notifyModelModifiedStateChanged) {
                        formCtrl.$$notifyModelModifiedStateChanged(modelCtrl);
                    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant