Skip to content

Instantly share code, notes, and snippets.

@russweas
Created June 29, 2015 13:44
Show Gist options
  • Save russweas/54f64f2e779f5bbca1ed to your computer and use it in GitHub Desktop.
Save russweas/54f64f2e779f5bbca1ed to your computer and use it in GitHub Desktop.
// app.js call method.
call: function(view, name, args = []) {
if(this.viewData[view].ready == true) {
this.viewData[view].model[name](args);
} else {
this.viewData[view].funcs_to_call.push({name: name, args: args});
}
}
// updated for loop inside each view
for(var i in methods)
{
this[methods[i].name](methods[i].args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment