I'm having issues using the modal component w/ footerbuttons (programatically) w/ ember 1.6.
The problem seems to be the init method on the ButtonComponent:
init: ->
@_super()
#If content is an object, then assign its properties to the button component
if @get('content')? and Ember.typeOf(@get('content')) is 'instance'
for key,val of @get('content')
@set key, val
else
if not @get('title')?
@set('title', @get('content'))
@attributeBindings.pushObject attr for attr of @ when attr.match(/^data-[\w-]*$/)?
When I change the for loop in the following way it assigns all relevant properties and behaves as expected:
for key,val of @get('content')
@set key, val if key? and key != 'constructor'
Shall the constructor object be really assigned (shallow copy)?
I'm having issues using the modal component w/ footerbuttons (programatically) w/ ember 1.6.
The problem seems to be the init method on the ButtonComponent:
When I change the for loop in the following way it assigns all relevant properties and behaves as expected:
Shall the constructor object be really assigned (shallow copy)?