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

How do I programmatically create several records with createRecord?

$
0
0

@greyhwndz wrote:

I want to do the following:

this.get(‘store’).createRecord(‘product’,
[
{ id: 1, name: ‘Apple’ },
{ id: 2, name: ‘Grapes’ },
{ id: 3, name: ‘Strawberry’ },
{ id: 4, name: ‘Banana’ },
{ id: 5, name: ‘Orange’ }
]);

How do I do it and where could I put this code so it runs one time during the start of the app?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4839

Trending Articles