Angular force a readonly text input to submit

时间:2016-03-04 17:49:30

标签: angularjs forms submit readonly

I have a readonly text input that I want to submit.

I want to preset the value in the form and have it stay there so the form could be resubmit.

How do you do this using Angular? P.S. it's not disabled, checked will be true.

                        <tr ng-repeat="param in paramList">
                        <td></td>
                        <td><input type="text" id="paramName"
                                               class="hidden_text ng-not-empty ng-touched"
                                               ng-model="mycommand.paramNames[$index]"
                                               ng-value="param.name"
                                               ng-disabled="!checked" />
                        </td>

1 个答案:

答案 0 :(得分:0)

set

 ng-disabled="true"

then it will be disabled as check is undefined or if checked is defined then it will be

 ng-disabled="{{!param.checked}}"