Angular Interview Practice

Question: 1 / 400

What is the command to create a new Angular project?

ng create project-name

ng new project-name

The command to create a new Angular project is "ng new project-name." This command is part of the Angular CLI (Command Line Interface), which provides a set of tools to initialize, develop, scaffold, and maintain Angular applications.

When using "ng new," the command generates a new directory with all the required files and configurations for an Angular application. This includes setting up a default folder structure, creating a package.json file, and installing necessary dependencies, like Angular core libraries. The "project-name" placeholder is replaced with the desired name of the project.

In contrast, other options do not correspond to the correct command for creating a new Angular project. "ng create" is not a valid command within the Angular CLI; rather, "ng generate" is used for generating various Angular artifacts (like components, services, etc.) after the project has already been created. The "npm start" command is typically used to serve an existing project, not to create a new one.

Get further explanation with Examzify DeepDiveBeta

ng generate project-name

npm start project-name

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy