Please have a look at this simple fiddle: http://jsfiddle.net/tgbpy/11/
I am not able to emit the event. I need to do this simple thing to do without creating a shared service. What am I doing wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To add to what @manoj was telling you
here is a fiddle that works
http://jsfiddle.net/tgbpy/13/
When you want to publish a message you call $rootScope.$broadcast unless the two controllers are nested. If you do $rootScope.$broadcast any scope wherever it is will get it.