Implicit Callback issue for Angular failing to load css, js, ... all assets when base url in index.html is dynamic

I have Angular 4 app, trying to implement okta so followed the instructions found in sample example here. The example application works fine but in my application it fails loading all the assets needed for my app.
I was able to reproduce same issue by changing the base url to dynamic in example application as well. In index.html change the base url to below …

<!-- base url -->
<base href="./">

It got stuck here
If I look in developer tools I found that the URL it looking for assets is wrong …
Request URL: http://localhost:4200/implicit/assets/css/bootstrap.min.css
GET http://localhost:4200/implicit/polyfills.bundle.js 404 (Not Found)

It should be
Request URL: http://localhost:4200/assets/css/bootstrap.min.css
GET http://localhost:4200/polyfills.bundle.js 404 (Not Found)

Please let me know what I am missing here to load my application successfully after the okta authentication callback.

1 Like

Tell me what you’re trying to achieve with the base href setting? I believe you’ll need to pass --base-href ./ to ng serve in order to change the base URL of your angular app.

Basically it’s the same thing either we change <base href='./'> or ng serve --base-href ./ will have same root url and will get the same error

Any luck on this @sgattu6? I’m running into the same issue

Any luck @shawn @robertjd ? I am having the same issue.

Were you able to fix these @sgattu6 ? I am having the same issue.