$rootScope.$broadcast or $rootScope.$emit didn't fire

22 views
Skip to first unread message

Abdelmawla Mohamed

unread,
Oct 15, 2014, 6:31:16 AM10/15/14
to ang...@googlegroups.com
Hello All,

I'm trying to figure out why this  Code is working as expected.

Thanks.

Justin Walsh

unread,
Oct 15, 2014, 7:33:45 AM10/15/14
to ang...@googlegroups.com
Hi Abdelmawla 

... because you haven't 'attached' the controller in your view/DOM

Add the following to your index.html and it will work:
<div ng-controller="controllerOne"></div>

Regards
Justin

Abdelmawla Mohamed

unread,
Oct 15, 2014, 7:46:37 AM10/15/14
to ang...@googlegroups.com
@Justing, thanks man I figured it out :)
Thanks 

Abdelmawla Mohamed

unread,
Oct 15, 2014, 7:46:39 AM10/15/14
to ang...@googlegroups.com
@Justing, thanks man I figured it out :)
Thanks 

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/z44BIBYDQjc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards

Abdelmawla
Reply all
Reply to author
Forward
0 new messages