Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
202 views
in Technique[技术] by (71.8m points)

angular - How to set the component to always be active?

I have an application built.

app.Component.html:

<div class="header">
  <app-nav></app-nav>
</div>
<div class="content">
  <router-outlet></router-outlet>
</div>
<div class="footer">
  <app-footer></app-footer>
</div>

In app.Component.ts, I have a HostListener binded to a keyEvent and I would like to have <router-outlet> always active even when I click on the <app-nav>.

Do you have any tips for that?

question from:https://stackoverflow.com/questions/65859738/how-to-set-the-component-to-always-be-active

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...