I'm having a javascript components that is distributed as .js file and .css file. In .js file the component is added to window
window.Component = { ... }
the component should be added to page with the following code Component.init('#componentHolderId', config);
I need to use my component in an Angular app (using Angular 11 if that matters).
Here are my questions.
- Where is the best place in angular app to put
.jsfile? Maybe it's somehow possible to add it to lazy-loaded module (as component needs to be used in a lazy-loaded module)? - Is there a way to add css to project other that adding it to
stylesarray inangular.json? My concern here is that this way will slow-up application start-up.