I would like to show a static HTML file as part of the Angular app, so included it in assets section in angular.json file. But still when accessing it http://localhost:4200/msal2.html via the browser, the angular routing tries to resolve it and shows the "Error: Cannot match any routes. URL Segment..".
I am using Angular v12 on windows.
If I access that static html page as http://localhost:4200/assets/msal2.html, then the response is the html content present in the index.html in the angular app, not the content of my static html file.
I have referred similar questions in SO, but not finding relevant solutions. Q1, Q2.
What am I missing? is it only possible by creating a component that can show this static html content, as shown in this SO answer?
The below is the assets section in the angular.json file,
"assets": [
"src/favicon.ico",
"src/assets",
"src/static/msal2.html"
],
ng build, where exactly is themsal2.htmlfile placed?dist/<projectname>/assets/staticfolder.http://localhost:4200/assets/static/msal2.html. Alternatively you can specify your asset as object, giving you further config options, see docsbasepath or any addition to therouteconfiguration to be done?