How to use Angular2 ngModel to input polymer paper? ERROR: no data access for ''

This is my first question, I am using angular2.8, polymer 1.0, typescript. I have a problem when I use ngModel data binding with a polymeric paper input element

Basically nothing more than an element with ngModel and a variable in the class. The run that creates this error: no access attribute for ''

I started using polymers with angular 2 just recently, and maybe this is a noobie question, but I cannot find any information covering this topic.

I have been looking for this error for some time, and I feel that I have no other options but to ask you guys.

0
angular typescript
source share
1 answer

You need to add ngDefaultControl

 <paper-input [(ngModel)]="myModel" ngDefaultControl></paper-input> 

See also https://github.com/angular/angular/issues/5360

+4
source share

All Articles