0
통화, 소득 및 수입 _ 연산의 세 가지 모델이 있습니다. 나는 그들을 어떤 길로 꾸미고 싶다. 그것을하는 올바른 방법은 무엇입니까? 한 페이지에 3 개의 모델을 어떻게 렌더링합니까?ember js에서 곱셈 모델을 렌더링하는 방법
UPD :이 모델에는 이들 사이에 연관이 없습니다.
route.js.coffee
@route 'addincome', { path: 'operations/addincome' }
EmberMoney.AddincomeRoute = Ember.Route.extend
model: ->
EmberMoney.IncomeOperation.find()
템플릿/addincome.handlebars
<div class="row container-bg"><br>
<div class="span6">
<ul>
{{#each operation in controller}}
<li>{{operation.sum}}</li>
{{/each}}
</ul>
</div>
<div class="span6">
{{outlet}}
</div>
</div>
// I want to render here more models! For example:
<ul>
{{#each income in incomes}}
<li>{{income.name}}</li>
{{/each}}
</ul>
렌더링 할 내용을 더 명확하게 나타낼 수 있습니까? –
3 가지 모델이 서로 어떻게 관련되어 있습니까? ie- hasMany 또는 belongsTo –
더 명확하게하기 위해 제 질문을 업데이트했습니다. – ejiqpep6