Ember.js
Javascript
code posted
created at 29 Apr 00:02
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
App = Ember.Application.create(); App.Person = Ember.Object.extend({ firstName: null, lastName: null, fullName: function() { return this.get('firstName') + " " + this.get('lastName'); }.property('firstName', 'lastName') }); App.IndexRoute = Ember.Route.extend({ model: function() { var people = [ App.Person.create({ firstName: "Tom", lastName: "Dale" }), App.Person.create({ firstName: "Yehuda", lastName: "Katz" }) ]; return people; } }); |
566 Bytes in 2 ms with coderay