0
這裏是一個模板:如何在Angular2中添加href?
<h2 (click)="goToPost()">{{post.title}}</h2>
goToPost()函數:
goToPost() {
this.router.navigate(['/post', this.post.id]);
}
而生成的鏈接是:mysite.dev/post/13
但現在我不能複製鏈接通過右鍵單擊。我應該如何在這裏實現錨標籤?