I have a button when a color has not been set: <input ng-if="!userpref.color" type="button" ng-click="userpref.color='#000000'">
Clicking the button swaps a color selector for the button: <input ng-if="userpref.color" type="color" ng-model="userpref.color"> The problem is that I want the color picker to open when I click the button. If I use this button the color picker opens, but the color is not set: <input ng-if="!userpref.color" type="button" onclick="this.type='color';this.value='#000000';" ng-model="userpref.color"> Can anyone show me how to accomplish what I want? -- 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/d/optout.
