Why don't the arguments to create() behave more like setProperties()?

前端 未结 2 671
梦如初夏
梦如初夏 2021-02-20 01:28

Something I find very counter-intuitive about Ember is you can overwrite a computed property setter functions ( http://emberjs.com/#toc_computed-properties-setters ) with the ar

2条回答
  •  醉话见心
    2021-02-20 02:11

    It's may be a dirty hack, but it's works for me.

    Em.Object.reopenClass({ 
       create: function(config) {
           return this._super().setProperties(config); 
       }
    });
    

提交回复
热议问题