Thursday, April 13, 2017

Angular CLI–Include a static html file

While integrating OIDC into my Angular app, I had to add a separate authentication page(originally named auth.html). However after bundling and serving my application using ‘ng serve’ I noticed that I couldn’t reach my ‘auth.html’ file and I got an error message instead…

The solution was obvious, any extra files you want to include should be added to the assets section inside the angular-cli.json file:

1 comment:

Gopi Krishna said...

Come and read us!! We are the No 1 AngularJS Training providers in Chennai. We are teaching how to be AngularJS Ninjas!!! That's right! - Our AngularJS Course Training was designed in a way which helps both freshers and professionals. Book your FREE DEMO Session now @ Credo Systemz angularjs training