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

fix(ng-options): support one-time binding on the options #10694

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

@lgalfaso lgalfaso commented Jan 8, 2015

Preserve the $watchDelegate on the watcher used to detect changes on the labels

Closes #10687

@lgalfaso
Copy link
Contributor Author

lgalfaso commented Jan 8, 2015

@petebacondarwin can you please make sure that the ng-options refactor also passes the tests added here?

expect(options.eq(1)).toEqualOption('0', 'a');
expect(options.eq(2)).toEqualOption('1', 'b');
expect(options.eq(3)).toEqualOption('2', 'c');
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to also have a test that verifies correct behaviour when arr is originally undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Preserve the $watchDelegate on the watcher used to detect changes on
the labels

Closes angular#10687
@lgalfaso lgalfaso force-pushed the select-one-time-binding branch from a87910f to 5cb015b Compare January 9, 2015 12:27
@petebacondarwin
Copy link
Contributor

Nice little fix @lgalfaso! I have updated my PR to include this.

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Jan 12, 2015
Utilize the $watchDelegate on the watcher used to detect changes to the labels.

Closes angular#10687
Closes angular#10694
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Jan 12, 2015
Utilize the $watchDelegate on the watcher used to detect changes to the labels.

Closes angular#10687
Closes angular#10694
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

one-time binding ng-options
4 participants