Build Status


This library provides type convert directives to augment angular.dart's ngModel directive. At the time said directive disregards types in your model and force assigns Strings to binded fields (excluding some special cases like checkboxes).

So there is no simple way to map values other than Strings and bools to inputs in template. This library is my attempt to circumvent this issue.


Import library as you would usually.

Install module

class YourModule extends Module {
  YourModule() {
    install(new AngularConvertModule());

    //Your other angular bootstrap stuff

Then in the templates annotate inputs with directives provided.

Implemented directives

  1. ngx-conv-num. Will map input value to num (int or double) property in the model. Workss on inputs of types text, number, and range and also selects.

  2. ngx-conv-date. Will map input value to DateTime property in the model. Works on inputs of type date.


See example