这里有什么问题?
ExecJS::ProgramError: Error: Parse error on line 11: Unexpected '.'
。咖啡
Person = Ember.Object.extend(
firstName: null
lastName: null
fullName: ->
firstName = @get("firstName")
lastName = @get("lastName")
firstName + " " + lastName
.property("firstName", "lastName")
)
原始.js
Person = Ember.Object.extend({
// these will be supplied by `create`
firstName: null,
lastName: null,
fullName: function() {
var firstName = this.get('firstName');
var lastName = this.get('lastName');
return firstName + ' ' + lastName;
}.property('firstName', 'lastName')
});