I'm new to Angular 2 CLI. As per tutorial, there is command provided called ng create <project_name>
. My scenario is creating project in existing directory.
It throws error like below:
Directory 'angular-basic' already exists.
Try ng init
will create project inside your existing directory then do ng serve
.
ng init <project-name> [options]
Creates a new Angular project in the current folder.
Options:
--dry-run only output the files created and operations performed, do
not actually create the project.
Alias: 'd'.
--verbose output more information.
Alias: 'v'.
--skip-npm do not run any npm command once the project is created.
--name The name of the project to create.
For New Angular 2.x Project
ng new foo
cd foo
npm link angular-cli
ng serve