如果有人有這個問題,請回答我。Ang ng禁用
像這樣工作正常(元素將被禁用時,其真):
<input type="text" class="no-phone-input" name="phone" ng-model="currentOrder.Customer.Phone" ng-pattern="/^[0-9-]+$/" ng-disabled="{{currentOrder.Status == 7 || currentOrder.Status == 9}}"/>
而這也工作:
<input type="text" id="orderNumberInput" class="no-num-input" name="OrderNumber" ng-model ="currentOrder.OrderNumber" ng-disabled="{{currentOrder.Status == 2 || currentOrder.Status == 3 || currentOrder.Status == 4 || currentOrder.Status == 6 || currentOrder.Status == 7 || currentOrder.Status == 8 || currentOrder.Status == 9}}" required/>
但在相同的角鑑於這種不`噸的工作(同樣的範圍):
<input id="customer" name="customer" type="text" ng-model="currentOrder.Customer.Name" ng-disabled="{{currentOrder.Status == 7 || currentOrder.Status == 9}}" required/>
元素禁用`噸...
納克-disabled =「{currentOrder.Status == 7 || currentOrder.Status == 9}「。單個括號或沒有括號..?是不是表達式? –
{},(),沒有括號 - 結果相同。不適用於客戶輸入。 –