angular-input-modified icon indicating copy to clipboard operation
angular-input-modified copied to clipboard

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

Open pjarosak opened this issue 8 years ago • 0 comments

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);
                    }

pjarosak avatar Mar 02 '17 12:03 pjarosak