Skip to content

Instantly share code, notes, and snippets.

View bharathvaj-ganesan's full-sized avatar
🏠
Working from home

Bharathvaj bharathvaj-ganesan

🏠
Working from home
View GitHub Profile
@bharathvaj-ganesan
bharathvaj-ganesan / architecture_1.js
Created March 15, 2017 03:16
Mithril Organizing Components
var ContactForm = {
controller: function() {
this.contact = m.prop(new Contact())
this.save = function(contact) {
Contact.save(contact)
}
},
view: function(ctrl) {
var contact = ctrl.contact()