Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Change Property Prefix from "_" to "$" so that angular built-in functions ignore them #1641

Closed
wants to merge 2 commits into from

Conversation

thielmal
Copy link

@thielmal thielmal commented Jun 6, 2016

Angular's built in functions like angular.copy() and angular.toJson() automatically ignore object properties that are prefixed with $.

This PR changes the names of "_uiSelectChoiceDisabled" and "_uiSelectChoiceLocked" to "$uiSelectChoiceDisabled" and "$uiSelectChoiceLocked" respectively to make use of this feature when using ui-select as a model for rest resources.

@user378230
Copy link
Contributor

Just a note that this could be a breaking change.

@peterreisz
Copy link

I'd prefer another solution, because you also can use a string list in a repeat: #1661

user378230 added a commit to user378230/ui-select that referenced this pull request Jul 8, 2016
Previously the item from the list was modified with the
_uiSelectChoiceDisabled property. This allowed a leakage of information
from ui-select to outside the directive. It also caused issues when the
was used outside of the directive.

This commit adds a reference array to store disabled items and so
prevents the need to modify the item in place.

Closes angular-ui#1200 and angular-ui#1661

Partially supersedes angular-ui#1641
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously the item from the list was modified with the
_uiSelectChoiceDisabled property. This allowed a leakage of information
from ui-select to outside the directive. It also caused issues when the
was used outside of the directive.

This commit adds a reference array to store disabled items and so
prevents the need to modify the item in place.

Closes angular-ui#1200 and angular-ui#1661

Partially supersedes angular-ui#1641
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
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.

3 participants