Open thomasguillory opened 10 years ago
In ScopeCtrl, it would be awesome to automatically have access to all instances variables in $scope, as for methods :
ScopeCtrl
Controller:
class MyCtrl extends ScopeCtrl initialize: -> @counter = 0 incrementCounter: => ++@counter decrementCounter: => --@counter
View:
{{ counter }} <button ng-click="incrementCounter()"> <button ng-click="decrementCounter()">
Main issue : I can't see how to nicely implement it. It would certainly need to implement a double data binding between $scope and controller object, which can done with watchers, but at a cost...
$scope
It's interesting. So we need to keep the fact that
@_private_methode
is not on the scope.
And why a fat arrow ? we should try to keep simple arrow ?
In
ScopeCtrl
, it would be awesome to automatically have access to all instances variables in $scope, as for methods :Controller:
View:
Main issue : I can't see how to nicely implement it. It would certainly need to implement a double data binding between
$scope
and controller object, which can done with watchers, but at a cost...