Leonardo Ferreira Leonardo Ferreira - 1 year ago 73
Javascript Question

Aurelia's Component Not Being Replace By Its Template

Why dont Aurelia's custom elements get replace by its template, instead of being put inside it?


I want this

<sidebar-item label="Dashboard" href="#" icon="icon-home4"></sidebar-item>

to be replaced by this

<li class="active">
<a href="index.html">
<i class="icon-home4"></i>

but instead, the result is this:

<sidebar-item label="Dashboard" href="#" icon="icon-home4">
<li class="active">
<a href="index.html"><i class="icon-home4"></i> <span>Dashboard</span></a>

Is there a way to replace the custom tag for its template?

Answer Source

Basically add @containerless to the view-model of SidebarItem.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download