📅  最后修改于: 2020-10-28 04:58:34             🧑  作者: Mango
md-input-container (一个Angular指令)是一个容器组件,其中包含任何或元素作为子元素。它还支持使用标准ng-messages指令进行错误处理,并使用ngEnter / ngLeave事件或ngShow / ngHide事件对消息进行动画处理。
下表列出了md-input-container的不同属性的参数和说明。
Sr.No | Parameter & Description |
---|---|
1 |
md-maxlength The maximum number of characters allowed in this input. If this is specified, a character counter will be shown underneath the input. The purpose of the md-maxlength is to show the max length counter text. If you don’t want the counter text and only need “plain” validation, you can use the “simple” ng-maxlength or maxlength attributes. |
2 |
aria-label Aria-label is required when no label is present. A warning message will be logged in the console if a label is not present. |
3 |
placeholder An alternative approach to using aria-label when the label is not present. The placeholder text is copied to the aria-label attribute. |
4 |
md-no-autogrow When present, the textareas will not grow automatically. |
5 |
md-detect-hidden When present, the textareas will be sized properly when they are revealed after being hidden. This is off by default for performance reasons because it guarantees a reflow every digest cycle. |
以下示例显示了md-input-container指令的用法以及输入的用法。
am_inputs.htm
验证结果。