Skip to content

Instantly share code, notes, and snippets.

@nathan
Last active December 31, 2015 23:39
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 nathan/8061615 to your computer and use it in GitHub Desktop.
Save nathan/8061615 to your computer and use it in GitHub Desktop.
var a = Amber;
a.model('User', {
data: {
name: { value: 'someone' }
}
});
a.view('User', {
template: '<div class=test-view>{{name}}</div>',
render: function(model) {
this.name = a.view.Key(model, 'name');
}
});
var view = a.view.User(a.model.Model());
document.body.appendChild(view.el);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment