January 2016
Intermediate to advanced
416 pages
8h 54m
English
The basic idea is simple: the user searches for the name of someone on GitHub in the input box. When he enters a name, we fire a request to the API designed earlier in this chapter. When the response from the API returns, the program binds that response to a model and emits an event notifying that the model has been changed. The views listen for this event and refresh from the model in response.
Let's start by defining the client-side model. The model holds information regarding the repos of the user currently displayed. It gets filled in after the first search.
// public/javascripts/model.js define([], function(){ return { ghubUser: "", // last name that was searched for exists: true, // does ...Read now
Unlock full access