Angular2: Error – md-input-container must contain an mdInput directive. Did you forget to add mdInput to the native input or textarea element?

Standard

Error:

Error at MdInputContainerMissingMdInputError.ZoneAwareError 

md-input-container must contain an mdInput directive. Did you forget to
add mdInput to the native input or textarea element?

screenshot_2

Solution:

<md-input-container style="color: black;" class="pull-xs-left">
       <textarea [(ngModel)]="content" mdInput></textarea>
</md-input-container>

directive md-input needs to replaced with mdInput

Advertisements