首頁>技術>

app Component html原始碼:

<h1>{{title}}</h1><nav> <a routerLink="/heroes">Heroes</a> </nav><router-outlet></router-outlet><app-messages></app-messages>

> A routerLink attribute is set to "/heroes", the string that the router matches to the route to HeroesComponent. The routerLink is the selector for the RouterLink directive that turns user clicks into router navigations. It's another of the public directives in the RouterModule.

HTML原聲標籤a的屬性routerlLink,是RouterLink指令的選擇器,將使用者點選轉換成navigation. RouterLink是RouterModule裡的公有指令。

最新評論
  • BSA-TRITC(10mg/ml) TRITC-BSA 牛血清白蛋白改性標記羅丹明
  • 實戰PyQt5:031-命令連線按鈕控制元件QCommandLinkButton