0
我想從節點傳遞參數,而不是屬性。例如:角度2:從節點傳遞參數
<!-- I would like to use this: -->
<navbar-comp>
<items>
<item label="Page 1" path="/page1" />
<item label="Page 2" path="/page2" />
<item label="Section 3">
<item label="Page 31" path="/section3/page1" />
<item label="Page 31" path="/section3/page2" />
</item>
<item label="Page 4" path="/page4" />
</items>
</navbar-comp>
<!-- instead of this: -->
<navbar-comp [items]="items"></navbar-comp>
如何從組件中讀取「項目」內容?那可能嗎?