Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between ng generate application <app-name> and ng new <app-new>

I know the difference that ng generate application <app-name> works only in angular app folder. but what are the other differences.

like image 796
optional Avatar asked Oct 12 '18 11:10

optional


People also ask

What is ng generate?

ng generate command generates and/or modifies files based on a schematic.

What does ng new do?

ng new command creates a workspace of given name with a default Angular Application. It provides interactive prompts to set optional configurations.


1 Answers

ng new NAME create a new workspace with a default application

ng g application NAME create a new application in an existing workspace

The official documentation does not explain this in full details. So I'll recommend dig out some blogs posts that make introductory post for it. Such as the following:

Angular 6 Workspace

like image 82
Xinan Avatar answered Sep 20 '22 23:09

Xinan