'how can i add javascript files into angular?
i have got a template works fine on visual studio , but when i tried to use it on my angular project i don't know why the javascript code doesn't work , i filled the app.component.html with the html code and i imported the css code . i installed bootstrap and font-awesome. the only problem i got is i don't know how to add javascript code into my project (angular 13 btw).
(function ($) {
"use strict";
// Spinner
var spinner = function () {
setTimeout(function () {
if ($('#spinner').length > 0) {
$('#spinner').removeClass('show');
}
}, 1);
};
spinner();
Solution 1:[1]
I use javascript in my angular project. Try to import javascript in your-project/src/index.html inside the body tag.
<body>
<app-root id="app-root"></app-root>
<script> </script>
</body>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vito Neto |
