0
<w3-test-directive id="first" url="tableParams" sql="select *from table1"></w3-test-directive>
<w3-test-directive id="second" url="tableParams2" sql="select *from table2"></w3-test-directive>
現在在我的指令模板,我想屬性id的值。 我怎樣才能得到它?
我的模板是如下:
template: [
'<p>The attribute value is {{value of id attribute}}<p>'
]
所以範本看起來有些事情是這樣的:
"<p>The attribute value is first<p>"
不要認爲模板應該是數組 – charlietfl
@charlietfl:良好的捕獲;我糾正了它。 – Makoto