Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Changing ng-options datasource is firing the ng-change automatically #16586

Open
@amiteshhh

Description

@amiteshhh

I'm submitting a ...

  • bug report
  • feature request
  • other

Current behavior:
Changing ng-options underlying datasource is triggering the ng-change handler when underlying ng-model was changed programmatically previously.

Expected / new behavior:
It should not trigger ng-change handler.

Minimal reproduction of the problem with instructions:

dd1 and dd2 are two independent dropdowns having different ng-options data source containing array of objects.
Step 1: Set ng-model for dd2 programmatically by clicking the button. This is not firing the ng-change handler of dd2 which is correct.

Step 2: Now change the dd1. Inside dd1 change handler assign new array data source to dd2 ng-options. This is automatically triggering the ng-change of dd2.

Demo link: https://plnkr.co/edit/mI44WPHmlPf5B6Sdpbxr?p=preview

AngularJS version: 1.6.9

Issue still exists in the most recent stable version 1.7.0 and in the snapshot AngularJS 1.7.1-build.26050+sha.0b1adbb

Browser: [all | Chrome 66 | Edge 40 | IE 11 ]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions