title | description | ms.date | ms.custom | ms.topic | ms.devlang | author | ms.author | manager | ms.technology | dev_langs | ms.workload | monikerRange | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Create an Angular app |
In this tutorial, learn how to create a simple Angular application in Visual Studio. |
07/30/2021 |
vs-acquisition |
tutorial |
javascript |
mikejo5000 |
mikejo |
jmartens |
vs-javascript |
|
|
>= vs-2022 |
[!INCLUDE Visual Studio]
In this 5-10 minute introduction to the Visual Studio integrated development environment (IDE), you create and run a simple Angular frontend web application.
Make sure to have the following installed:
- Visual Studio 2022 Preview 2 or later. Go to the Visual Studio downloads page to install it for free.
- npm (https://www.npmjs.com/), which is included with Node.js
- Angular CLI (https://angular.io/cli) This can be the version of your choice
-
In the New Project Dialog, select Create a new project.
:::image type="content" source="media/vs-2022/create-new-project.png" alt-text="Create a new project":::
-
Search for Angular in the search bar at the top and then select Standalone TypeScript Angular Template.
:::image type="content" source="media/vs-2022/angular-choose-template.png" alt-text="Choose a template":::
-
Give your project and solution a name.
When you get to the Additional information window, be sure NOT to check the Add integration for Empty ASP.NET Web API Project option. This option adds files to your Angular template so that it can be hooked up with the ASP.NET Core project, if an ASP.NET Core project is added.
:::image type="content" source="media/vs-2022/angular-additional-info.png" alt-text="Additional information":::
-
In Solution Explorer, right-click the Angular project, select Properties, and then go the Debugging section.
-
Change the Debugger to launch to the launch.json option.
:::image type="content" source="media/vs-2022/angular-choose-debugger.png" alt-text="Choose the debugger (launch.json)":::
Choose Build > Build Solution to build the project.
Note, the initial build may take a while, as the Angular CLI will run the npm install command.
Press F5 or select the Start button at the top of the window, and you'll see a command prompt:
-
The Angular CLI running the ng start command
[!NOTE] Check console output for messages, such as a message instructing you to update your version of Node.js.
Next, you should see the base Angular apps appear!
For ASP.NET Core integration:
[!div class="nextstepaction"] Create an ASP.NET Core app with Angular