0
工作我都誰打開嵌套列表一個JSON誰看起來像這樣的(「選項」)引導模態的工作版本:自舉模式和灰燼
{
product: [{
id: 1,
title: 'Some dope shoes',
options: [
{ id: 1, name: 'Color' },
{ id: 2, name: 'Size' }
]
},
{
id: 2,
title: 'Some dope',
options: [
{ id: 3, name: 'Lenght' },
{ id: 4, name: 'Flavor' }
]
}
]
}
我已經寫了一切與情態動詞我做過的模板使用任何文件組件。訣竅是使uniq模式ID。網址看起來像:
<a href="#" data-toggle="modal" data-target="#ma-modal{{optionid}}" title={{title}}>{{mmmh}}</a>
與情態動詞的樣子:
<div class="modal" id="ma-modal{{optionid}}"></div>
我不覺得有信心此代碼,因爲我學的餘燼,我想知道,如果做這一切在沒有任何文件組件的模板是不好的?
玩ID在我看來是黑客。
我不使用自舉,但已經實現了使用這個優秀的教程模式 - HTTP:/ /blog.atmartin.io/a-simple-modal-for-ember-v2-component-edition/它使用Ember.js組件 – michaellee
是的,讀起來也是非常有趣的一個。也許會試圖以這種方式實現它。 :/ – Mio
還有一個很棒的插件:https://github.com/yapplabs/ember-modal-dialog – Keo