I have a modal popup where I have different sections. Based on whatever section user clicks, that section's info should come up.
I have something like this-
<div id="one">
<h1>One</h1>
<p>Section One</p>
</div>
<div id="two">
<h1>Two</h1>
<p>Section Two</p>
</div>
And later in the form I have the links like-
<ul>
<li><a href="#one">One</a></li>
<li><a href="#two">Two</a></li>
</ul>
As soon as I click on the link it redirects me to the root(default) of the homepage rather than this particular section.
I'm using Angular 14. Can anyone help me with this?
Edit: I tried this solution and it worked for me. Here's the link.