Hi I'm using the "controller as" syntax as it is pretty straight forward 
using classes in coffeescript. However, so far I could not figure out how 
to get to $scope to construct $scope.$emit and the respective $scope.$on 
for event emitters and event listeners.

I'm creating my controllers like this:

.controller 'MyCtrl',
  class MyCtrl

    foo: ''
    bar: ''

  myFoo: ->
      ...

  myBar: ->
      ...

That works as expected until I discovered that I may need $scope get the 
event emitters/listeners as stated above. Is it possible to mix the two 
approaches? and if yes - how would I get the $scope?
The method stated in a related 
thread<https://groups.google.com/forum/#!searchin/angular/%22controller$20as%22/angular/3VYcAg2EF2g/TyGfLyzn1mIJ>did
 not work 
thx,  tomw

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to