Angular 9转到不同页面上的锚点

I want to have a link that goes to a page and a certain section, in plain HTML I would just use <a href="myPage#mySection">go to my section</a> and I would be able to use it everywhere.

我应该如何在Angular 9中做到这一点?搜索此内容时,我发现许多旧的答案不再起作用。很抱歉,这似乎是一个简单的问题,但我仍然习惯于Angular。

评论