Angular add more html pages


1. ng-build with your index.html set properly with its components. (or conditional app-components)
2. rename and copy the rendered to (for example) /src/search.html
3. in angular.json (angular-cli.json for pre v5) find "assets":

"assets": [
"src/favicon.ico",
"src/search.html",
"src/assets"
],

browse localhost:4200/search.html
enjoy :)

Comments

  1. Hello Bresleveloper,
    Thanks for your comment on the git issue, that helped me to set some static pages. I tried to set my landing page as static also but no success, do you think I could use the same solution of adding it to the "assets"?
    Anyway I've created a question on stackoverflow but it seems devs do not use the landing page static...
    https://stackoverflow.com/questions/66678299/static-landing-page-on-angular
    Thanks!!
    Lou

    ReplyDelete

Post a Comment

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

Asp.Net Ending Response options, Response.End() vs CompleteRequest()