1

Where will Angular-cli be installed?can I run Angular-cli expression without install it globaly?

Ali Abbaszade
  • 151
  • 1
  • 2
  • 16

2 Answers2

1

Its is Installed globally

This is a step you only have to do once. Once it's installed globally with "-g", you can skip this step when creating new Angular 2 projects. Also it's important to note, you need Nodejs and NPM installed before you can proceed with this step.

Its is installed in Nodejs Modules Globally

npm install -g @angular/cli

a dummy location -> usr/local/lib/node_modules/@angular/cli/node_modules/

Then use the following Commands to create a new project

ng new PROJECT_NAME
cd PROJECT_NAME
ng serve

for more info on cli check the wiki

Ashish Johnson
  • 379
  • 4
  • 16
Rahul Singh
  • 19,030
  • 11
  • 64
  • 86
  • I have multi angular cli projects and each of them has a node module folder.they are similar and I want one node module file for all projects,is it possible? In other words how to build several angular cli projects with one node module – Ali Abbaszade Jun 09 '17 at 17:19
  • Your cli is installed​ in a global node folder where as project has local node module. I dnt think you can use common node modules – Rahul Singh Jun 09 '17 at 17:21
  • 1
    https://stackoverflow.com/questions/37588674/link-to-global-node-modules-folder-from-angular2-app Please see this link – Ali Abbaszade Jun 09 '17 at 17:26
  • Thanks @Ali this was a good learning i dnt know about this thanks – Rahul Singh Jun 09 '17 at 17:29
  • So see this link https://stackoverflow.com/questions/6480549/install-dependencies-globally-and-locally-using-package-json – Ali Abbaszade Jun 09 '17 at 17:33
0

Angular CLI github

you will use NPM to install angularCLI

npm install -g @angular/cli

notice -g parameter it will install cli globally and you can you it in any new project from now on.

CLI is installed in NPM.

Pribina
  • 750
  • 1
  • 7
  • 14