AngularJS更改UI未反映在Firefox的$ scope中

时间:2015-11-09 14:34:49

标签: angularjs firefox

我正在使用Firefox-42.0和AngularJS v1.4.7。

HTML:

<div class="modal-body">
<p>Select user to share with from the list below.</p>
<div class="form-group">
    <label for="">Search:</label>
    <input type="text" class="form-control" ng-model="SharedSearchKey" ng-model-options="{ debounce: 600 }" />
</div>
<div class="modal-table" ng-show="usersToShare && usersToShare.length">
    <table class="table table-striped table-responsive table-condensed">
        <thead>
            <tr>
                <th>Name</th>
                <th>User Name</th>
                <th>View Only Tasks</th>
                <th>Permission</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="row in usersToShare">
                <td ng-bind="row.ContactName"></td>
                <td ng-bind="row.UserName"></td>
                <td>
                    <input type="checkbox" ng-model="row.TaskAssign" ng-init="row.TaskAssign=true" />
                </td>
                <td>
                    <select ng-model="row.permission" ng-init="row.permission='1'">
                        <option value="1">Readonly</option>
                        <option value="2">Write</option>
                    </select>
                </td>
                <td>
                    <input type="checkbox" ng-model="row.selected" ng-click="toggleSelectThisUser(row)" />
                </td>
            </tr>
        </tbody>
    </table>
</div>

控制器中的

JS:

$scope.toggleSelectThisUser = function (user) {
    console.log(user);
};

当我更改下拉列表并单击checkBox时,它不会反映在$ scope中。 $ scope包含初始值。 Firefox中会出现此问题。但它在谷歌浏览器中工作正常。

0 个答案:

没有答案