1. <legend id='k0kAI'><style id='k0kAI'><dir id='k0kAI'><q id='k0kAI'></q></dir></style></legend>

    • <bdo id='k0kAI'></bdo><ul id='k0kAI'></ul>
  2. <tfoot id='k0kAI'></tfoot>

    <small id='k0kAI'></small><noframes id='k0kAI'>

    1. <i id='k0kAI'><tr id='k0kAI'><dt id='k0kAI'><q id='k0kAI'><span id='k0kAI'><b id='k0kAI'><form id='k0kAI'><ins id='k0kAI'></ins><ul id='k0kAI'></ul><sub id='k0kAI'></sub></form><legend id='k0kAI'></legend><bdo id='k0kAI'><pre id='k0kAI'><center id='k0kAI'></center></pre></bdo></b><th id='k0kAI'></th></span></q></dt></tr></i><div id='k0kAI'><tfoot id='k0kAI'></tfoot><dl id='k0kAI'><fieldset id='k0kAI'></fieldset></dl></div>

      在 Mobile Safari 上调试缓慢的 angular-ui-router 状态更改

      时间:2024-04-14
              <tbody id='OJUTu'></tbody>

            <small id='OJUTu'></small><noframes id='OJUTu'>

              <tfoot id='OJUTu'></tfoot>
                <bdo id='OJUTu'></bdo><ul id='OJUTu'></ul>
                <i id='OJUTu'><tr id='OJUTu'><dt id='OJUTu'><q id='OJUTu'><span id='OJUTu'><b id='OJUTu'><form id='OJUTu'><ins id='OJUTu'></ins><ul id='OJUTu'></ul><sub id='OJUTu'></sub></form><legend id='OJUTu'></legend><bdo id='OJUTu'><pre id='OJUTu'><center id='OJUTu'></center></pre></bdo></b><th id='OJUTu'></th></span></q></dt></tr></i><div id='OJUTu'><tfoot id='OJUTu'></tfoot><dl id='OJUTu'><fieldset id='OJUTu'></fieldset></dl></div>
                <legend id='OJUTu'><style id='OJUTu'><dir id='OJUTu'><q id='OJUTu'></q></dir></style></legend>
                本文介绍了在 Mobile Safari 上调试缓慢的 angular-ui-router 状态更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在编写一个 Angular 应用程序,使用 angular-ui-router 来管理状态/路由.

                I'm writing an angular app, using angular-ui-router to manage states / routing.

                在桌面浏览器(Chrome/Safari)上运行良好.但是,在 iPhone 4 上的 IOS 6 上的 Mobile Safari 上(以及在 iPhone 5 上的 IOS 7 上的较小扩展)上,通过 $state.go 更改状态可能需要长达 2 秒的时间.

                On desktop browsers (Chrome / Safari) this is working fine. However, on Mobile Safari on IOS 6 on iPhone 4 (and to a lesser extend on IOS 7 on iPhone 5) changing state, via $state.go, can take anything up to 2 seconds.

                我使用的是 ngTouch,所以我不认为原生点击事件需要 300 毫秒才能触发.不调用 $state.go 的 ngClick 属性现在似乎几乎可以立即工作.

                I'm using ngTouch, so I don't think that it's the 300ms that the native click event takes to fire. ngClick attributes that don't call $state.go now seem to work pretty much instantaneously.

                如何调试它以找到时间花费的地方?

                How can I debug this to find where the time is being spent?

                推荐答案

                ngTouch 不适用于 ui-sref 指令.我们使用 fastclick.js 来处理点击行为,并移除了 ngTouch.问题是指令会踩到彼此的事件,实际上是不兼容的.你可以通过阅读这两个指令的实现来看到这一点.

                ngTouch doesn't work with the ui-sref directive. We used fastclick.js to handle the click behavior, and removed ngTouch. The issue is that the directives step on each others events, and are in fact incompatible. You can see this by reading the implementation of both directives.

                这篇关于在 Mobile Safari 上调试缓慢的 angular-ui-router 状态更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:运行 android AVD 管理器时显示错误“未安装 HAX 内核模块!" 下一篇:“语义错误:使用不同类型重新定义 '__ccContentScaleFactor'"在 Coc

                相关文章

              • <legend id='6M693'><style id='6M693'><dir id='6M693'><q id='6M693'></q></dir></style></legend>

                <small id='6M693'></small><noframes id='6M693'>

                <i id='6M693'><tr id='6M693'><dt id='6M693'><q id='6M693'><span id='6M693'><b id='6M693'><form id='6M693'><ins id='6M693'></ins><ul id='6M693'></ul><sub id='6M693'></sub></form><legend id='6M693'></legend><bdo id='6M693'><pre id='6M693'><center id='6M693'></center></pre></bdo></b><th id='6M693'></th></span></q></dt></tr></i><div id='6M693'><tfoot id='6M693'></tfoot><dl id='6M693'><fieldset id='6M693'></fieldset></dl></div>
                    <bdo id='6M693'></bdo><ul id='6M693'></ul>
                1. <tfoot id='6M693'></tfoot>