如何在Backbone中使用hash回调?

时间:2014-11-30 23:54:12

标签: javascript backbone.js

我的代码:

    var Workspace = Backbone.Router.extend({

      routes: {
        "Chart":  "chart_view",   
        "Dummy": "dummy_view",  
        "Table": "table_view"  
      },

     chart_view: function() {

        this.hide_all_views();
        $(".chart").show();
       console.log('chart_view')
      },

var route = new Workspace

我初始化route.navigate(" Dummy")但是回调dummy_view不是init?怎么修 ?

0 个答案:

没有答案