I know that this question has been asked before, but the only answer I could find is at
https://github.com/aurelia-contrib/aurelia-dynamic-html/issues/1 and
https://github.com/aurelia/router/pull/558
which refers to ignoreUnknownRoutes
on the router.
Where is the ignoreUnknownRoutes
on the router?
All I’m trying to do is (I thought this would be extremely trivial):
@autoinject
export class QuickLinksCustomElement {
@bindable public legend: string;
public list = [
{ id: "#purchases", text: "Purchases", active: "" },
{ id: "#production", text: "Production", active: "" },
{ id: "#profit-and-loss", text: "Profit and loss", active: "" },
{ id: "#cashflow", text: "Cashflow", active: "" },
{ id: "#kpis", text: "Key performance indices", active: "" },
{ id: "#variables", text: "Variables", active: "" }
];
public clicked(index: number) {
this.list.forEach(c => {
c.active = "";
});
this.list[index].active = "active";
}
}
<li repeat.for="item of list" class="nav-item">
<a class="nav-link ${item.active}" href.bind="item.id" click.delegate="clicked($index)">${item.text}</a>
</li>