Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...