Lets say that I have a model with two attributes: name and url. If I want to build a column of links like this <a href="url">name</a> how can I do it? as far as I know, using contentPath or getCellContent only allow me to send one of those attributes.
I've been trying something like this:
controller.js
Column.create({
headerCellName: 'link',
contentPath: 'url',
tableCellView: TableCell.extend({
templateName: 'link'
})
})
link.hbs
{{#link-to view.cellContent}}
???
{{/link-to}}
But I'm stuck in the way of letting the template know those two fields. I'm very new to ember so sorry if this is a newbie question. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire