Skip to content

Instantly share code, notes, and snippets.

@ArTiSTiX
Last active January 4, 2016 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArTiSTiX/b41a6bc9bdc2af783872 to your computer and use it in GitHub Desktop.
Save ArTiSTiX/b41a6bc9bdc2af783872 to your computer and use it in GitHub Desktop.
enyo.kind({
name: "MyApp.Session",
kind: 'enyo.Controller',
currentUser: null,
published: {
userId: null,
token: null
}
});
enyo.kind({
name: "MyApp.Models.User",
kind: "MyApp.Model",
url: "/users",
attributes: {
id : null,
name: '',
first_name: '',
last_name: '',
email: ''
}
})
enyo.kind({
name: "MyApp.MainView",
kind: "FittableRows",
fit: true,
events: {
onAddRecord: ""
},
bindings: [{
from: ".app.$.session.currentUser.name", // Doesn't work -____-
to: ".toolbar.content"
}],
components: [{
name: "toolbar",
kind: "onyx.Toolbar",
content: '###'
}
//...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment