ember.js - How to call multiple methods in Route model function -


I have a template named index. In this index path I am already sending a model.

For example: Think of it as a condition, comments

I have data related to status in the index template.

If I want to present the comments for that situation, I need another template.

If I have another template I should define a route

Instead of related data in my components.

Now, I am calling this component in my index template. Like

  & lt; Script type = "text / x-handlebars" & gt; {{Status-comments}} & lt; / Script & gt;  

Here, I can not be able to present the comments data.

Because already there is a model function related to the index root stase. So I was not able to set the comment model in the same index route?

Which version of amber-data are you using? If you are using the latest version of Amber-data then you have the link of the URI location and you will get the app amplifier data when you request it in the template, or elsewhere. Find the amber-data source code for 'link'.

  App.Status = DS.Model.extend ({... Comments: DS.hasMany ('comment')});  

Jason back to the status server:

  {... link: {comments: 'http://app.com/api/status/1445    

Status template:

  {{every comment in the status}} {{/ each}}  

The link attribute ember-data tells where it has hymenic relation.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -