Creating a link for a created HTML files in an HTML file that are in the same folder with angular framework

Viewed 37

I'm working on a web site as the final HTML project for uni that uses angular as the framework, I'm required to have 4 articles as separate HTML pages and have the article.component.html hold the links to the other pages

I used the <a href="my.html">my</a> to create a link, but when I pressed it, it just opens an the default localhost:4200 page without the content that's in the file and I can't seem to understand what I'm doing wrong, the article components and the article pages are all in the same folder, I tried looking for some possible answers here and other sites but everything that I've tried kept showing the same thing, I tried the parent folder, root folder, everything.

1 Answers

Thank you for giving me help, I did try to what was suggested, but it didn't work. I then had to ask my tutor for help and he explained that I had to create the articles as separate components so that I'd be able to use the routeLink in the a tag.

Apologies for not mentioning that the articles didn't originally existed as components.

Related