我使用md-is-error来显示错误。它在输入中工作正常,但在md-select中不起作用。这是我的代码:
Array
(
[0] => すぐに諦めて昼寝をするかも知れない。
[1] => I may give up soon and just nap instead.
)
我的代码适用于<div ng-controller="AppCtrl" layout="column" ng-cloak="" class="inputdemoErrors" ng-app="MyApp">
<md-content layout-padding="">
<form ng-submit="projectForm()" name="testForm">
<div layout="row">
<md-input-container class="md-block" flex-gt-sm md-is-error="project.postalCode == undefined && testForm.$submited">
<label>Postal Code</label>
<input ng-model="project.postalCode"
required name="ptCodeInput">
</md-input-container>
<md-input-container flex="50" md-is-error="project.type == undefined && testForm.$submited">
<label>Project Type</label>
<md-select ng-model="project.type" required>
<md-option value="app">Application</md-option>
<md-option value="web">Website</md-option>
</md-select>
</md-input-container>
</div>
<div>
<md-button type="submit">Submit</md-button>
</div>
</form>
</md-content>
</div>
,但Postal Code
选择无效。
有没有建议在md-select中使用md-is-error?
答案 0 :(得分:0)