6

When I generate a new Angular 4 project using dotnet new angular and ng new, what are the chief differences between the two generated projects?

I have done a folder compare which was very quick and told me they have a few differences on that level. I am not very interested in those differences.

I'm only interested in the handful of high-level differences. An example is splitting a module for pre-rendering in one project and not the other. Given the size of the scaffolded projects, a list of differences wouldn't be more than say 10, so I'm sure asking about the high-level difference is not too broad a question here.

ProfK
  • 49,207
  • 121
  • 399
  • 775
  • 1
    `dotnet new` angular includes universal – yurzui Aug 04 '17 at 13:12
  • 1
    Thanks, @Faisal, that is quite an interesting one. Why not make it an answer and get some points. I see people are voting to close, so answer while you can. – ProfK Aug 04 '17 at 13:14

2 Answers2

2

One difference that I noticed is that dotnet new angular will create project with webpack.json, whereas ng new will create with .angular-cli.json

FAISAL
  • 33,618
  • 10
  • 97
  • 105
  • 2
    `angular-cli` uses webpack internally. `.angular-cli.json` is just wrapper over webpack config – yurzui Aug 04 '17 at 13:28
  • Ofcourse, but angular-cli.json is much more simpler and easier to use than webpack.json – FAISAL Aug 04 '17 at 13:29
  • 1
    @yurzui Why not make your original comment an answer, and expand a little on how that wrapping of webpack works. – ProfK Aug 04 '17 at 13:31
0

Angular Cli

The angular cli is use for the purpose of making angular components, run tests, serve, build and such. It does not touch .net.

you include any scripts that don't come through npm

As yurzui mentioned it uses webpack internally.

Dotnet cli

The dot net one will generate a project that will load and build in visual studio and expects to use .net mvc on the backend ,it sets up the mvc app to properly serve a single page app / api and has universal support out of the box

sometimes you have to include parts of things that come from npm in that manner as well depending upon the nature of it what specifically do you want to know

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396