简体   繁体   English

检查Backbone.history的方法已经开始了吗?

[英]Way to check Backbone.history has already been started?

Is there a way to check whether Backbone.history already have been started or not. 有没有办法检查Backbone.history是否已经启动。

I am consuming a view as a service which is written using Backbone and routers. 我正在使用Backbone和路由器编写的服务视图。 When I am rendering the view I am getting the error Backbone.history has already been started . 当我渲染视图时,我收到错误Backbone.history has already been started

Is there a way to avoid the error? 有没有办法避免错误?

Because of this error the routers attached in the external view is not invoked. 由于此错误,不会调用外部视图中附加的路由器。

Backbone.History.started is a boolean variable that indicated whether or not History has been started. Backbone.History.started是一个布尔变量,指示是否已启动历史记录。 Be sure that the H is uppercase. 确保H是大写的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM