How to include compodoc files in a Angular project

364 Views Asked by At

I am creating app using angular 6 and I would like add the documentation (build with compodoc) in this app but I don't know how add the JS files in the template like in the index.html of compodoc.

I know that I must do some thing like that :

var s=document.createElement("script");
s.type="text/javascript";
s.src="https://unpkg.com/@webcomponents/custom-elements"; //external script

But in my case the files aren't external but internal and if I put a path like that:

 s.src="src/app/documentation/documentation/js/libs/custom-elements.min.js";

I have this error:

Failed to load for the item <script> whose source is « http://localhost:4200/src/app/documentation/documentation/js/libs/custom-elements.min.js

How can i include all these js files in angular app?

0

There are 0 best solutions below