akp
akp

Reputation: 61

How to navigate to a div in another component in Angular 2?

I have routeConfig as follows and I am using HashLocationStrategy.

@RouteConfig([
    {path: '/', name: 'Home', component: HomeComponent, useAsDefault: true},
    {path: '/me', name: 'Profile', component: ProfileComponent}
])

How can I navigate to a div(or section) in the profile view (profile#skills) from the Home view using angular2 routing

I would do a href on /profile.html#skills if it was plain html. I am not sure how to do this in angular2. May be it is something simple.Appreciate any pointers.

TIA

Upvotes: 1

Views: 361

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 658087

This is currently a bug or missing feature in Angular2. See also https://github.com/angular/angular/issues/6595

Upvotes: 0

Related Questions