Search code examples
angularangular-cliidentityserver4angular2-routeropenid-connect

Angular: Allow standalone html file to be loaded


I'm using oidc-client.js silent renew feature and need to load standalone html file to be able to finish renewal process.

Right now every url with dev server host (f.e. http://localhost:4200/silent-renew.html) gets hooked by angular router and processed accordingly to route table, so I keep ending up on default page instead of silent renew page.

Is there a way to tell angular to not process that concrete url, so plain html page can be loaded?


Solution

  • Took me a while, but in the end solution appeared to be quite simple - html file should be added as asset in .angular-cli.json:

    "assets": [
        "assets",
        "favicon.ico",
        "silent-renew.html"
      ],
    

    Or just dropped into assets folder.