问题
I have this computed property alias in my component:
firstElement: Ember.computed.alias('myArray.firstObject')
This works in development, but doesn't update in production mode.
This code though works in both development and production:
firstElement: Ember.computed('myArray.[]', function() {
return this.get('myArray.firstObject');
}
Is the alias macro not allowed on firstObject , lastObject, etc..?
It also seems weird that in works in development but not in production mode.
来源:https://stackoverflow.com/questions/44192637/ember-computed-alias-on-array-firstobject-not-working