Yeah, I've seen stuff go both ways there. You can definitely pass in a
notifier function to call that triggers a change (and then attach that
notifier to ng-click or whatever). Or you could do a $scope.$watch on
whatever variable represents the select1's selected value. I feel like that
way's a bit easier (and less dangerous to pollution than globally
broadcasting events).

e


On Thu, Jun 12, 2014 at 11:21 AM, Jonathan Matthew Beck <[email protected]>
wrote:

> I thought I'd clarify this further, it's really just a communications
> issue.
>
> If the directives declare this listener:
>
> $scope.$on('someEvent', function(event, target, data) {
>    // is this my directive?
>    if(target == $scope.fieldName) {
>        // do something with data
>    }
>
> });
>
> And the data-ng-changed function does this:
>
> $scope.$broadcast('someEvent', targetFieldName, data);
>
> Then that will work, but it broadcasts to all the directives.  Is there a
> better way?
>
>
>  --
> 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