2015-09-03 41 views
1

我有這個輸入字段如何使用需要輸入

<td> 
    <input class="task-input" type="text" value="" ng-model="workflow.TaskDescription" ng-model-options="{ updateOn: 'blur' }" 
    ng-change="addActionButtons(workflow)" placeholder="Task" /> 
</td> 

此欄目必須填寫每行和每用戶不能填寫下一行,而該字段爲空。在這種情況下如何使用requiredng-required

回答

0

使用NG-所需= 「真」 輸入標籤中。

<td> 
    <input class="task-input" type="text" value="" ng-model="workflow.TaskDescription" ng-model-options="{ updateOn: 'blur' }" 
    ng-change="addActionButtons(workflow)" placeholder="Task" ng-required="true" /> 
</td> 
0

您可以使用HTML required財產

<input class="task-input" type="text" value="" ng-model="workflow.TaskDescription" ng-model-options="{ updateOn: 'blur' }" 
ng-change="addActionButtons(workflow)" placeholder="Task" required />