ajay dixit ajay dixit - 1 month ago 7
AngularJS Question

Set Default color value to angularjs color picker

I am trying to set default color value to my directive
my div is

<div class="field">
<color-picker ng-model="config.primaryColor" options="options"></color-picker>
</div>

Answer

just put

$scope.config = {};

$scope.config.primaryColor = '#FF0000';

this will work I think