Backbone.js history 'on route change' event?

后端 未结 4 2188
遥遥无期
遥遥无期 2020-12-08 13:23

Is there a general event that fires every time we navigate to a different URL?

window.App =
  Models: {}
  Collections: {}
  Views: {}
  Routers: {}

  init:         


        
4条回答
  •  隐瞒了意图╮
    2020-12-08 14:09

    @TTT: Unfortunately Backbone doesn't give us a before/after event, so you will need to overwrite or extend the Router.route. You can find the way to do that in this answer: https://stackoverflow.com/a/16298966/2330244

提交回复
热议问题