ember-script icon indicating copy to clipboard operation
ember-script copied to clipboard

No normal javascript property access on set

Open hajee opened this issue 11 years ago • 1 comments

On the site an example with normal java property access is given.

person.firstName = "Andrew"
person*.firstName = "Manuel"

is translated to:

// Generated by EmberScript 0.0.7
var get$ = Ember.get;
var set$ = Ember.set;
set$(person, 'firstName', 'Andrew');
set$(person, 'firstName', 'Manuel');

Shouldn't there be a difference between using the * operator and not using it? I would suspect the code to be translated to:

// Generated by EmberScript 0.0.7
var get$ = Ember.get;
var set$ = Ember.set;
set$(person, 'firstName', 'Andrew');
person.firstName = 'Manuel';

hajee avatar Apr 07 '13 20:04 hajee

Not sure why this issue has gone unresolved for so long. I'm doing my Ember hello world today, using ember-cli and emberscript, which is leading to a surprising number of gotchas for a framework which recently went 1.0.

Ember.MODEL_FACTORY_INJECTIONS = true

Uncaught TypeError: Cannot read property 'set' of undefined

Sinetheta avatar Dec 21 '14 23:12 Sinetheta