jeudi 23 mars 2017

Checkbox and file tags don't work in Angular2

I have a form in Angular2 with several input types: text, file, checkbox, and textarea. When you click on the text and textareas, they focus as expected. However, when I click on the checkbox or file elements, nothing happens. The checkbox doesn't check, the "select a file" dialog doesn't open. I've tried this with and without [ngModel] and it doesn't seem to make a difference.

At first I thought this might be because of some issue with z-index, but I've tried removing all instances of z-index and that doesn't make a difference.

Another thought I've had from researching this is that some method is getting called somewhere for these elements onclick that counteracts the natural behavior of the elements, but I can't find any instances of where this might be happening in my own code.

I am a beginner in Angular2 so apologies beforehand if it's some simple answer I haven't thought of.

TYIA!




Aucun commentaire:

Enregistrer un commentaire