module.run + $emit/$on, the "Angular Way"?

1,516 views
Skip to first unread message

John Lindquist

unread,
Apr 11, 2012, 1:55:10 PM4/11/12
to ang...@googlegroups.com
Just looking for confirmation that this fiddle follows best practices (it's at least what my mind drove to and I haven't seen any examples like it):



Vojta Jína

unread,
Apr 11, 2012, 5:19:05 PM4/11/12
to ang...@googlegroups.com
Yep, this works fine.

I would rather add parent controller:

V.

On Wed, Apr 11, 2012 at 10:55 AM, John Lindquist <johnli...@gmail.com> wrote:
Just looking for confirmation that this fiddle follows best practices (it's at least what my mind drove to and I haven't seen any examples like it):



--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/Xx_rneAOvvkJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

John Lindquist

unread,
Apr 11, 2012, 5:51:12 PM4/11/12
to ang...@googlegroups.com
Should $rootScope be considered "off-limits" for models/listeners per best practices? Per the docs, module.run() seemed to be a good setup/initialization hook for setting up models/listeners shared throughout the module, but $rootScope is the only $scope available at that point (as far as I understand).

Thanks.
Reply all
Reply to author
Forward
0 new messages