index.html 파일에서 <a routerLink="/Profile">Profile</a>
을 사용하는 동안 문제가 있습니다. 앵커 태그가 제대로 작동하지 않았습니다. 나는 index.html을에 머리글 메뉴를 배치 할 때 내가 파일을 작업 app.component.html<a routerLink="#Profile">Profile</a> 각도 4에서 워킹되지 않습니다.
같은 줄의 코드 <a routerLink="/Profile">Profile</a>
에 배치됩니다
<router-outlet></router-outlet>
각 4
<a href="#Profile" routerLink="/Profile" routerLinkActive="active">
<span class="icon-cogs"></span>Profile</a>
에서 라우팅을 위해 다음 코드를 추가 할 다른 구성 요소에 넣지 만 index.html에서 작동하지 않습니다.
는 또한'HREF를 제거 = " #Profile ". –
프로젝트 구조를 제공해 주시겠습니까? –