0

directory.views.SearchPage とは何ですか? 上記のようにこの関数を呼び出すことができますか? ページロードを呼び出すことは可能ですか?

directory.views.SearchPage = Backbone.View.extend({

templateLoader: directory.utils.templateLoader,
EmployeeListView: directory.views.EmployeeListView,

initialize: function() {
  this.template = _.template(this.templateLoader.get('search-page'));
},

render: function(eventName) {
  $(this.el).html(this.template(this.model.toJSON()));
  this.listView = new directory.views.EmployeeListView({el: $('ul', this.el), model:this.model});
  this.listView.render();
  return this;
},
events: {
  "keyup .search-key": "search"
},
// Start the search function
search: function(event) {
  var key = $('.search-key').val();
  this.model.findByName(key);
}
});
4

1 に答える 1