The thing you want to watch doesn't necessarily exist by the time you call
$watch. There are a lot of use cases where you set a watcher in a
directive's link function, but some other piece of code asynchronously
loads the data that will populate the scope.

Kevin

On Tue, Mar 24, 2015 at 2:15 PM, Michael Salmon <[email protected]> wrote:

> Sander, et al
>
> I tested it and fixed the misspelling in valReturn/valreturn. That doesn't
> "work".
>
> But my original question, I already have my app "working". I'm looking for
> the motivation behind the design, not another hack.
>
> Cheers,
> Michael
>
> On Tuesday, March 24, 2015 at 8:31:20 AM UTC-7, Sander Elias wrote:
>>
>> hi Micheal,
>>
>> function valReturn(x) {return x}
>> _.each(list, function(item){$scope.$watch(valreturn(item), cb);} // ah
>> nice
>>
>> I'll think that will do the trick;)
>>
>> Regards
>> Sander
>>
>>  --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to