角度输入错字问题

时间:2017-12-02 11:16:57

标签: angularjs

<div data-ng-app="myAPP" data-ng-controller="employeeCtrl"> 

    <div>
        <input type="hidden" name="employee.EmployeeID" data-ng-model="employee.EmployeeID" value="{{employee.EmployeeID}}"/>
        Employee Name : <input type="text" name="employee.EmployeeName" data-ng-model="employee.EmployeeName" value="{{employee.EmployeeName}}"/><br/>
        Employee Address : <input type="text" name="employee.EmployeeAddress" data-ng-model="employee.EmployeeAddress" value="{{employee.EmployeeAddress}}"/><br />
        Employee Salary : <input type="text" name="employee.EmployeeSalary" data-ng-model="employee.EmployeeSalary" value="{{employee.EmployeeSalary}}"/><br /><br />
        <input type="button" value="Save" name="btnSave" data-ng-click="savedata(employee)" />
        <input type="button" value="Update" name="btnUpdate" data-ng-click="updatedata(employee)" />
        <br />
    </div>
    <br />
    <table style="border:1px solid gray">
        <tr>
            <th>Employee Name</th>
            <th>Employee Address</th>
            <th>Employee Salary</th>
            <th>Select Employee</th>
        </tr>
        <tr data-ng-repeat="emp in employees">
            <td>
                {{emp.EmployeeName}}
            </td>
            <td>
                {{emp.EmployeeAddress}}
            </td>
            <td>
                {{emp.EmployeeSalary}}
            </td>
            <td>
                <a href="#" data-ng-click="selectEmployee(emp.EmployeeId)">Select</a>
                <a href="#" data-ng-click="deleteEmployee(emp.EmployeeId)">Delete</a>
            </td>
        </tr>
    </table>
</div>

无法使用角标记在文本框中键入文本。 无法使用角标记在文本框中键入文本。

无法使用角标记在文本框中键入文本。

任何建议....

1 个答案:

答案 0 :(得分:0)

只需从输入中删除ng值

即可
<div>
        <input type="hidden" name="employee.EmployeeID" data-ng-model="employee.EmployeeID"/>
</div>