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

How to instanciate a model in a route

$
0
0

@Cedric_Arnould wrote:

I created a model:

ember g model test name:string When i try to instanciate it, it doesnt work:

//app/routes/example.js model(params) { return Ember.test.create({ name: params.value }); }, In the console i can see: test Cannot read property 'create' of undefined TypeError: Cannot read property 'create' of undefined

Can you explain why it doesnt work?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4836

Trending Articles