Search code examples
angularasp.net-coreasp.net-core-mvcangular-clidotnet-cli

Dotnet Angular template and Core 2.0 MVC


After some reading about Angular, I am still confused about several things.

  1. When using "dotnet new Angular", what Angular version is integrated with the created solution? There are some blogs explain why you would integrate an SPA to an MVC Core solution, but no one has explained why they haven't used Angular template on dotnet 2.0 instead.

  2. Apparently there are people who still call Angular 4 with 2 instead. Why?

  3. How Visual Studio 2017 (Win and Mac versions) can run Angular apps?

Thanks


Solution

    1. In the generated project you can find the Angular library versions in the package.json file at the "dependencies". I just tried it, and it generated the latest Angular versions.

    2. Angular 2 and Angular 4 is compatible. Apparently there is not so much difference between Angular 2 and 4, I think that's why some people call Angular 4 still Angular 2. (There is a huge difference between Angular 1.X and Angular 2+, thats why Angular 1.X is called "AngularJS" and Angular 2+ "Angular"). Details: https://www.quora.com/What-is-the-difference-between-Angular-2-and-Angular-4

    3. Visual Studio uses Webpack to build the Angular application. The mechanism is like you would use the Angular CLI.