AngularJS $ q承诺IE浏览器挂起

时间:2019-02-06 13:23:48

标签: angularjs

我在Internet Explorer中遇到一个问题,当尝试使用$ q promise获得数据时。 IE挂起很长时间,然后加载数据。

怎么了?

请任何专家建议。

HTML

<table class="table">

                    <tbody>
                    <tr ng-repeat="vehicle in vm.vehiclesList track by $index">
                        <td ng-repeat="parameter in vehicle.values"
                            title="{{parameter.parameterValue}}">
                            <div title="{{'empty' | translate}}"
                                 data-ng-if="vm.getCellInformations(parameter).type == 'hole'">
                                <i class="fa fa-exclamation-triangle"></i>
                            </div>
                            <i class="fa" style="cursor: pointer"
                               data-ng-show="parameter.show && vm.getCellInformations(parameter).type !== 'hole'"
                               data-ng-click="vm.toggleNode(parameter)"
                               data-ng-class="parameter.active ? 'fa-check-square-o' : 'fa-square-o'"></i>
                            <span data-ng-show="parameter.show">{{parameter.parameterValue}}</span>
                        </td>
                    </tr>
                    </tbody>
                </table>

JS

initialPromise    = this.VehicleService.initSetCopy( vcFilter , postData).$promise;

            initialPromise.then( (success) => {

                    this.vehiclesLoading = false;
                    this.vehiclesList = success.vehicles;
                    initialPromise.resolve();
                },
                (error) => {
                    this.vehiclesLoading = false;
                    initialPromise.reject();
                });
            return initialPromise.promise;

0 个答案:

没有答案