Skip to content

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

Open
@pjarosak

Description

@pjarosak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions