Look into the documentation for `$watch`.
http://docs.angularjs.org/api/ng.$rootScope.Scope#methods_$watch

What's happening is that `$watch` is called during each `$digest` cycle and
calls `listener` if the value of `watchExpression` changes. Because you are
triggering `$watch` when the user clicks a button, it isn't possible for
the value of `watchExpression` to have changed since the last `$digest`
cycle.

Hope that helps and Happy Thursday!

On Thu, Jan 23, 2014 at 5:53 PM, Michael Herman <[email protected]> wrote:

> Is this attached to the wrong scope?
>
> newvalue == oldvalue every time?
>
> http://plnkr.co/edit/mcTY1F4cevDEZgkw0noV?p=preview
>
> https://github.com/mjhea0/angular-find-country
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to