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

refactor(form): remove the use of the private setter function #12483

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

@lgalfaso lgalfaso commented Aug 2, 2015

Remove the private setter function from $parse
Replace the use of setter from the form directive to use $parse

Remove the private `setter` function from $parse
Replace the use of `setter` from the `form` directive to use $parse

function getSetter(expression) {
if (expression === '') {
return $parse('this[""]').assign;
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

410f7c6 added some code changes and a test so when the name is the empty string, then the form object is stored in the scope under the '' name. This code workarounds this case as the empty expression is not assignable

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@lgalfaso lgalfaso closed this in 94533e5 Aug 7, 2015
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
Remove the private `setter` function from $parse
Replace the `setter` from the `form` directive with $parse

Closes angular#12483
ggershoni pushed a commit to ggershoni/angular.js that referenced this pull request Sep 29, 2015
Remove the private `setter` function from $parse
Replace the `setter` from the `form` directive with $parse

Closes angular#12483
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.

3 participants