Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

'data' as an attribute?

$
0
0

@haldiggs wrote:

What if I have to use the name 'data' as an attribute?

I am using the d3 tree-layout libary for svg https://github.com/mbostock/d3/wiki/Tree-Layout which uses a pretty specific json structure (without severely modifying the code)

export default DS.Model.extend({
	clientid: DS.attr(),
	name:  DS.attr(),
	nodetype: DS.attr(),
	data: DS.attr(),
	_children: DS.hasMany('orgtree')
});

as you can see the 'data' element conflicts with a pretty basic rule of Ember-Data not to use that name. Is there a work-around?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles