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

I should be able to supply $scope.$watch a comparator function to check for equality #2871

Closed
wants to merge 1 commit into from

Conversation

roypeled
Copy link

@roypeled roypeled commented Jun 4, 2013

Currently, $watch either checks for equality by object reference, or by Angular's equals function, which iterates through the objects properties.

We should be able to supply $watch with an comparator function to have a more lean equality detection.

@pkozlowski-opensource
Copy link
Member

@roypeled Yes, this was discussed already. Could you add unit tests to move forward on this one?

@pkozlowski-opensource
Copy link
Member

PR Checklist (Minor Feature)

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name for cross reference)
  • Feature improves existing core functionality
  • API is compatible with existing Angular apis and relevant standards (if applicable)
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required [commit message

@pkozlowski-opensource
Copy link
Member

@roypeled Are you still interested in working on this PR? It will needs tests as a start.

@petebacondarwin
Copy link
Contributor

@roypeled - are you able to improve this PR and have you signed the CLA?

@mhevery
Copy link
Contributor

mhevery commented Jul 31, 2013

Closing due to 1) inactivity, 2) No CLA, 3) lack of tests, 4) having a custom comparator also implies that we need to have a custom clone function for the object to get the full benefit of this API change.

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

Successfully merging this pull request may close these issues.

4 participants