Textarea Component
Name: fmTextarea
(Prefix Configurable)
Type: component
This component creates a <label>
and a <textarea>
control. The control and label will be assigned matching id
and for
attributes.
Bindings
Name | Type | Description |
---|---|---|
name |
@ |
Name of the control. |
placeholder |
@ |
Textarea placeholder. |
config |
< |
Control configuration object. (See: Control Configuration) |
ng-disabled |
< |
Expression to evaluate to determine if the component should be disabled. (Passed-through to the underlying <textarea> element.) |
API
This control extends the FormationControl
class, and does not implement any additional methods.
Additional Behavior
- Transclusion: Transcluded content will be placed in the
<label>
created by this component. - CSS
- The class
has-error
will be applied to the<textarea>
and<label>
elements when the control has an error. - The class
is-pending
will be applied to the<textarea>
and<label>
elements when the control is pending. - Disabling: The component can be disabled/enabled in any of four ways:
- The class
Example
<fm name="vm.myForm" controls="vm.controls">
<fm-input type="email" name="email">E-Mail Address:</fm-input>
<fm-textarea name="messageBody">Message:</fm-textarea>
</fm>