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

fix error when md-button is disabled anchor #1074

Closed
wants to merge 1 commit into from

Conversation

nikita-yaroshevich
Copy link
Contributor

attr.ngDisabled can't be trackable by $watch because it is not inside the scope.

attr.ngDisabled can't trackable by $watch without because it is not inside the scope.
@googlebot
Copy link

Thanks for your pull request.

It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/.

If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@gkalpak
Copy link
Member

gkalpak commented Dec 31, 2014

Do you have a testcase that works with this patch and fails without ?

I believe this patch is doing the wrong thing.
ngDisabled holds an Angular expression. The expression itself won't change; it's the expression's evaluated outcome that we want to watch.

@gkalpak
Copy link
Member

gkalpak commented Jan 9, 2015

@ThomasBurleson: Are you sure this patch should have been merged ?
ngDisabled is supposed to hold an expression (docs). It is this expression that needs to be evaluated and watched and not attrs.ngDisabled (which will always return the expression string).

For an example of what I mean, take a look at this demo.

@ThomasBurleson
Copy link
Contributor

@gkalpak - thank you for the recheck. Somehow I merged this without testing myself. I will resolve today.

@ThomasBurleson ThomasBurleson reopened this Jan 9, 2015
@ThomasBurleson ThomasBurleson added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jan 9, 2015
@ThomasBurleson ThomasBurleson removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jan 10, 2015
@ThomasBurleson ThomasBurleson self-assigned this Jan 12, 2015
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