Octavian Niculescu
Octavian Niculescu

Reputation: 445

Create Angular components in Visual Studio 2019

I've been using VS Code for ASP.Net + Angular projects, and there I could've generated a new Angular component using some extensions from the context menu:

click

Now after I've migrated to Visual Studio 2019 (not Code) and making a project with ASP.NET Core + Angular, I don't know how to generate an Angular component, because I'm not able to find anything related to it in the menu.

click

So how do you generate an Angular component in VS?

Are you using VS Code for Client-side and VS for back-end or is there any extension that I'm missing for VS?

Thanks.

Upvotes: 3

Views: 8062

Answers (3)

typecast
typecast

Reputation: 11

There is an extension called Angular Item Templates by Pavel Agarkov available in visual studio for adding angular components

Upvotes: 1

Passionate Coder
Passionate Coder

Reputation: 7294

From First image Click on Open In Integrated Terminal

or use below key to open terminal:
ctrl + shift + `

run command ng g c component name

You can check documentation for command

https://angular.io/cli/generate#component

Upvotes: 2

Selman Alpdundar
Selman Alpdundar

Reputation: 80

You do not need any extension just use angular cli. Open new terminal in the Visual Studio Code from Terminal -> New Terminal. Then write on the console ng generate component "component-name" or ng g c "component-name"

Upvotes: 2

Related Questions