In this tutorial, we’ll learn how to use external and custom JavaScript libraries/code in Angular 10 projects which are based on TypeScript.

You will need to have the following prerequisites:

  • Basic Knowledge of TypeScript and Angular,
  • Node and NPM installed on your machine,
  • Angular CLI 10 (npm install -g @angular/cli),
  • An Angular project.

You can create an Angular 10 project by running the following command in your terminal:

$ ng new angular-javascript-demo

In the recent versions of Angular, you’ll be prompted by the CLI for a couple of questions such as if Would you like to add Angular routing? (y/N) and Which stylesheet format would you like to use?. You can answer these questions as you see fit because this won’t affect how to use JavaScript libraries in your Angular project.

#angular #javascript

Use JavaScript in Angular 10/9
16.05 GEEK