简体   繁体   中英

ng-model color (in angular dart)

I am trying to bind color input using ng-model. In the following code:

<ul>
<li ng-repeat="col in ctrl.maincols">
<p>{{col.attr}}:{{col.value}}
  <input type="color" ng-model="col.value"></p>
  </li>
   </ul>

there is no reaction when I select a colour. However if I change the input type to text everything works fine.

Any suggestions for making this work, or an alternative to ng-model for this use case?

It seems an editor for <input type="color"> is not yet implemented

see https://github.com/angular/angular.dart/blob/master/lib/directive/ng_model.dart

You could try to copy a similar and customize it to your needs. You could also create a feature request. Please add a link here if you do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM