0

angular Component no reload

{
  path: 'content/:nodeId/:key',
  component: ContentComponent
} 

url:

  • content/1/1
  • content/2/1
  • content/3/1

ContentComponent is singleton mode?

2

2 Answers 2

0

The component will not reload if you navigate to it with the router or an anchor tag that users a routerLink. It will reload it you type the url in the browser address bar.

Sign up to request clarification or add additional context in comments.

1 Comment

my component still reloads:
0

Components will not reload - it's kind of single page application where Angular helps you to route to different components without loading - this happens when you use routerLink or router.navigate() methods

Instead of routerLink use href on your html with the route name the page will reload for you - hope this helps - happy coding :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.