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
346 views
in Technique[技术] by (71.8m points)

angular - Static HTML Page without Header/Footer

I want to display some static HTML page in Angular but that should not contain any header/footer and also the URL like http://localhost:4200/check not http://localhost:4200/check/index.html I have tried multiple links:

  1. Added file in asset folder that is working fine but I need to give index.html in the URL so that is not required. I need URL with HTML file name like http://localhost:4200/check (only folder name)
  2. Added file as component (e.g check/index.html) but access through http://localhost:4200/check but this is not working on other systems and even after publishing.
  3. Header/Footer we are using in almost 50 component so cannot change a lot of setting in routing.module.
  4. { path: '**', component: check } -- this is also not working
See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

This problem is solved. Just need to save the HTML static file in the assets folder then you can call it from any component.


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

...