关于以下错误。我收到模板解析错误RouterLink
。
RouterLink
在 Angular 2中使用的正确方法是什么 ?
Unhandled Promise rejection: Template parse errors:Parser Error: Unexpected token / at column 2 in [[/events]] in ng:///t/e.html@30:46 ("r">
<ul class="nav nav-sidebar">
<li class="active"><a [ERROR ->][routerLink]="[/events]">Events</a></li>
<li><a [routerLink]="[/task"]>Tasks<"): ng:///t/e.html@30:46Parser Error: Unexpected token / at column 2 in [[/events]] in ng:///t/e.html@30:46 ("ebar"> <ul class="nav nav-sidebar">
<li class="active">[ERROR ->]<a [routerLink]="[/events]">Events</a></li>
<li><a [routerLink]="[/task"]>Tas"): ng:///t/e.html@30:43, Directive tParser Error: Unexpected token / at column 2 in [[/events]] in ng:///t/e.html@30:46 ("ebar">
<ul class="nav nav-sidebar">