ajay dixit ajay dixit - 1 year ago 106
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>

Answer Source

just put

$scope.config = {};

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

this will work I think

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download