• <legend id='wGWKA'><style id='wGWKA'><dir id='wGWKA'><q id='wGWKA'></q></dir></style></legend>
  • <tfoot id='wGWKA'></tfoot>

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

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

        Angular ui-router 中 $state.transitionTo() 和 $state.go() 之间的区

        Difference between $state.transitionTo() and $state.go() in Angular ui-router(Angular ui-router 中 $state.transitionTo() 和 $state.go() 之间的区别)

        1. <tfoot id='yKPeE'></tfoot>
            <bdo id='yKPeE'></bdo><ul id='yKPeE'></ul>
            • <small id='yKPeE'></small><noframes id='yKPeE'>

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

              <legend id='yKPeE'><style id='yKPeE'><dir id='yKPeE'><q id='yKPeE'></q></dir></style></legend>

                    <tbody id='yKPeE'></tbody>

                1. 本文介绍了Angular ui-router 中 $state.transitionTo() 和 $state.go() 之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 AngularJS 中,我看到有时我们使用 $state.transitionTo(),有时我们使用 $state.go().谁能告诉我它们有何不同以及何时应该使用一个而不是另一个?

                  In AngularJS, I see sometimes we use $state.transitionTo() and sometimes we use $state.go(). Can anyone tell me how they differ and when one should be used over the other?

                  推荐答案

                  你指的是AngularUI 路由器?如果是这样,wiki 指定差异:

                  Are you referring to the AngularUI Router? If so, the wiki specifies the differences:

                  $state.go(to [, toParams] [, options])

                  返回一个表示转换状态的 Promise.

                  Returns a Promise representing the state of the transition.

                  转换到新状态的便捷方法.$state.go 在内部调用 $state.transitionTo 但自动将选项设置为 { location: true, inherit: true, relative: $state.$current, notify:真}.这使您可以轻松地使用绝对路径或相对路径,并仅指定您想要更新的参数(同时让未指定的参数从当前状态继承).

                  Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows you to easily use an absolute or relative to path and specify only the parameters you'd like to update (while letting unspecified parameters inherit from the current state).

                  $state.transitionTo(to, toParams [, options])

                  返回一个表示转换状态的 Promise.

                  Returns a Promise representing the state of the transition.

                  转换到新状态的低级方法.$state.go() 在内部使用 transitionTo.$state.go() 在大多数情况下推荐使用.

                  Low-level method for transitioning to a new state. $state.go() uses transitionTo internally. $state.go() is recommended in most situations.

                  这篇关于Angular ui-router 中 $state.transitionTo() 和 $state.go() 之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                    <tbody id='JHnl9'></tbody>

                    <tfoot id='JHnl9'></tfoot>

                      • <bdo id='JHnl9'></bdo><ul id='JHnl9'></ul>

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

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