<bdo id='rstmX'></bdo><ul id='rstmX'></ul>

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

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

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

        启动backbone.js 历史记录时无法调用未定义的“开始".

        时间:2024-04-20

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

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

              <tfoot id='ZQFwS'></tfoot>
                <bdo id='ZQFwS'></bdo><ul id='ZQFwS'></ul>
              • <legend id='ZQFwS'><style id='ZQFwS'><dir id='ZQFwS'><q id='ZQFwS'></q></dir></style></legend>

                  本文介绍了启动backbone.js 历史记录时无法调用未定义的“开始".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在调用时得到 Cannot call 'start' of undefined...

                  I get Cannot call 'start' of undefined when calling...

                      Backbone.history.start()
                  

                  当运行一些检查时,Backbone 返回对象但 Backbone.history 返回未定义.

                  When running some checks Backbone returns the object but Backbone.history returns undefined.

                  这可能是什么原因?

                  谢谢

                  推荐答案

                  控制器上有路由吗?Backbone 仅在至少指定一条路由后才创建历史记录.

                  Do you have any routes on the controller? Backbone only creates the history once at least one route is specified.

                  更多:

                  TypeError:无法调用未定义的方法'start'**

                  TypeError: Cannot call method 'start' of undefined**

                  嗯,出于某种原因,Backbone.history 未定义,因此没有start 方法就可以了.事实证明,Backbone.js 创建了一个实例Backbone.History(大写H")称为 Backbone.history(小写case ‘h’) 一旦创建了一个控制器,它至少有一个上指定的路线.这是有道理的,因为历史管理只是如果有要响应的路由,则需要.

                  Hmm, for some reason Backbone.history is undefined, and so there is no start method on it. It turns out that Backbone.js creates an instance of Backbone.History (upper case ‘H’) called Backbone.history (lower case ‘h’) once a controller has been created that has at least one route specified on it. This makes sense, as history management is only required if there are routes to respond to.

                  http://tinnedfruit.com/2011/04/26/testing-backbone-apps-with-jasmine-sinon-3.html

                  这篇关于启动backbone.js 历史记录时无法调用未定义的“开始".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:合并两个编译步骤的 source maps 下一篇:Coffeescript 在函数中包装文件

                  相关文章

                  <tfoot id='5chMP'></tfoot>

                  1. <small id='5chMP'></small><noframes id='5chMP'>

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