Forgot a small detail - the strategy for #2 is to set the properties on the 
object under $rootScope.$apply....

On Friday, November 7, 2014 11:24:21 AM UTC-5, ibfizzy wrote:
>
> We have dojo legacy work ( yes, that needs to be rebuild, but for now... ) 
> that is firing pubsub events that we want to attach to.  The current way we 
> are doing it isn't working, and we are trying to simplify it for devs 
> coming on board.  The two methods we are considering are as follows:
>
> 1. Subscribe to the dojo events and broadcast down from $rootScope when 
> they fire.
>
> 2. Subscribe to the dojo events, and manipulate a property on the angular 
> $rootScope when they fire, which consumers can watch or what-not.
>
> 3. Suggestions?
>
>
> In MOST cases, the information provided by the pubsub events will not be 
> automatically bound into a view, but more likely manipulated first, and 
> used to update parts of a view.
>
> My problem is I'm not sure which one performs better / makes more sense. 
>  The potential for the events to be frequent is high, to the keypress 
> level.  Want to make sure it's handled the best way via Angular.  The 
> debate internally is that #1 is not 'The Angular Way' to do things, and #2 
> is more angular.
>
> Any pro-tips, thoughts on this?  Would really appreciate it!
>

-- 
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