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

md-color not updating properly #8212

Closed
clshortfuse opened this issue Apr 26, 2016 · 2 comments
Closed

md-color not updating properly #8212

clshortfuse opened this issue Apr 26, 2016 · 2 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue
Milestone

Comments

@clshortfuse
Copy link
Contributor

clshortfuse commented Apr 26, 2016

When using the following code:

md-colors="{'color': (currentNavItem.id == item.id ? 'accent' : 'grey') }")

The property is set only once, when initially calculated, and not updated when I change the internal value (currentNavItem)

But, this works just fine.

ng-style="{'color': (currentNavItem.id == item.id ? getThemeColor('accent') : null)}")

with this as a workaround:

$rootScope.getThemeColor = $mdColors.getThemeColor;

I can make a codepen if needed.

Extra bug, is I can't set md-color to null, but that's not as important.

@ThomasBurleson
Copy link
Contributor

CodePen please... as we can use that to co-verify any fixes/changes.

@ThomasBurleson ThomasBurleson added the needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue label Apr 26, 2016
@ThomasBurleson ThomasBurleson added this to the 1.1.0 milestone Apr 26, 2016
@clshortfuse
Copy link
Contributor Author

Here's the codepen: http://codepen.io/shortfuse/pen/BKOZyO?editors=1010

EladBezalel added a commit that referenced this issue Apr 27, 2016
- Moved expression parsing inside the watch, this way the watch could really trigger changes when the interpolated expression had changed

fixes #8212
@EladBezalel EladBezalel added has: Pull Request A PR has been created to address this issue and removed needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue labels Apr 27, 2016
EladBezalel added a commit that referenced this issue Apr 28, 2016
- Moved expression parsing inside the watch, this way the watch could really trigger changes when the interpolated expression had changed

fixes #8212
EladBezalel added a commit that referenced this issue May 10, 2016
- Moved expression parsing inside the watch, this way the watch could really trigger changes when the interpolated expression had changed

fixes #8212
EladBezalel added a commit that referenced this issue May 11, 2016
- Moved expression parsing inside the watch, this way the watch could really trigger changes when the interpolated expression had changed

fixes #8212
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants