Beta.10 karma testing fails when using [(ngModel)] in template, with error: No value accessor for ''

Thanks a lot! You solved the problem!

This problem only happened in the Karma testing part, not in the app itself. It only happened when we used an Ionic2 directive with an [(ngModel)] property (no karma error when the [(ngModel)] property was missing). The Karma error was: No value accessor for ‘’.

Solution, in short, as you’ve found out: add a directives: [Range] to your component (this problem of tests failing when this directives line is not included, only happens in page components, it seems).

This directives line is not necessary to run the app. The app runs just fine without it. It is needed only for the Karma tests not to barf and only when the directive has an [(ngModel)] property.