0
<a [routerLink]="['/R1',{para:value}]">
は、私は、タグの外にangular2 router、ルートパラメータをアンカーに入れる方法は?
/link/route1/para/value
を得るのですか
/link/route1/?para=value
のようなリンクを作成しますか?
<a [routerLink]="['/R1',{para:value}]">
は、私は、タグの外にangular2 router、ルートパラメータをアンカーに入れる方法は?
/link/route1/para/value
を得るのですか
/link/route1/?para=value
のようなリンクを作成しますか?
経路設定
@Component({
selector: 'my-app',
directives: [ROUTER_DIRECTIVES],
template: `
<h2>Hello</h2>
<a [routerLink]="['/Form']">Form</a>
<a [routerLink]="['/Other', {para:'xxx'}]">Other</a>
<router-outlet></router-outlet>
`
})
@RouteConfig([
{path: '/form', name: 'Form', component: HeroFormComponent, useAsDefault: true},
{path: '/other/:para', name: 'Other', component: OtherComponent, }
])
export class App {
}
のパスに嵌合パラメータを宣言