I have a controller, with $scope.colorHex
value
For example I have the directive colorpickerTooltip
and in the template I call another directive: <colorpicker ng-model="colorHex"></colorpicker>
then in the second directive (colorpicker
) I set up controller's value:
scope.colorHex = '#cecece';
and then in the second directive I call method scope.doIt()
, but something is going wrong:
my $scope
value is not updated! But why, maybe because of my 2-level directive?
How to set up the controller variable value?