Sorry to bring that back but am I the only one who see a design problem
here?
We define an alias in the view/template ( MyCtrl as controller ), if we
want to watch a variable in the (controller) scope from the controller, we
need to know the alias we defined in the template
($scope.$watch('controller.varname', ...),
it's not DRY, it generates coupling and prevent reusing several times the
same controller (nested).
I'm suggesting a $controllerScope injectable (a $scope 'scoped' on the
controller) to solve that, does anyone else want something like that?
Le vendredi 14 juin 2013 21:19:12 UTC+2, Guillaume Lecomte a écrit :
>
> Doesn't that feature need a way to inject a controllerScope in the
> controller (a scope where this is the controller) to be able to watch
> members agnosticly of the alias defined in the view to be complete? Or
> provdide a way to mixin that scope in the controller?
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.