Reputation: 117
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>
Upvotes: 0
Views: 983
Reputation: 19986
just put
$scope.config = {};
$scope.config.primaryColor = '#FF0000';
this will work I think
Upvotes: 1
Reputation: 1053
I think you should define $scope.config={}
first then add to it the primary color
Upvotes: 1