i'm new in angular 5 and i try to call JS files from my HTML components but the navigator (Google Chrome in my case) cannot execute files,i tried call a simple js file (dirBonjour.js) in my component HTML.where can i put js files ?i need help please and thanks in advance.
here my files:
dirBonjour
<p>produit works!</p><br/><br/><br/><br/>
<h1>this my first 3D object loaded in a page</h1>
<table cellspacing="0" cellpadding="2" >
<tbody>
<tr>
<script src="assets/dirBonjour.js">
</script>
</tr>
</tbody>
</table>
produitComponent:
<p>produit works!</p><br/><br/><br/><br/>
<h1>this my first 3D object loaded in a page</h1>
<script src="assets/dirBonjour.js"></script>
<table cellspacing="0" cellpadding="2" >
<tbody>
<tr>
<td>visual</td>
<td>code</td>
<td>studio</td>
</tr>
</tbody>
</table>
my js file: dirBonjour.js
alert('bonjouuuuuuuuuuuuuuur');
console.log('heeeeeeeeey');
Aucun commentaire:
Enregistrer un commentaire