My problem is how to add a JavaScript file to use it within my project, and try to add it to the assets
folder and it does not work, the following appears:
Uncaught ReferenceError: edit is not defined
at HTMLButtonElement.onclick ((index): 13)
My code is:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="../assets/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../assets/script.js" type="text/javascript"></script>
<title>Intento</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.js"></script><script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="styles.js"></script><script type="text/javascript" src="vendor.js"></script><script type="text/javascript" src="main.js"></script>
</body>
</html>
The problem is that I do not know how instanciar
the JavaScript file.