تعليمات AngularJS ng-disabled

التعريف والاستخدام

ng-disabled يحدد التعليمات خاصية disabled لحقل النموذج (input، select أو textarea).

إذا ng-disabled إذا كانت العبارة في الخاصية تعود إلى الصحة، فإن حقل النموذج سيتم تعطيله.

ng-disabled التعليمات ضرورية للتحويل بين القيم في الحقيقة والصحة. في HTML، لا يمكنك تعيين خاصية disabled إلى false (وجود خاصية disabled يجعل العنصر معطل، بغض النظر عن قيمته).

مثال

Enable/Disable input fields:

Disable form fields: <input type="checkbox" ng-model="all">
<br>
<input type="text" ng-disabled="all">
<input type="radio" ng-disabled="all">
<select ng-disabled="all">
<option>Female</option>
<option>Male</option>
</select>

Try It Yourself

Syntax

<input ng-disabled="expression</input>

is affected by <input><select> and <textarea> Element Support.

Parameters

Parameters Description
expression If the expression returns true, then the disabled attribute of the element is set.