Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular JS 2 Difference between npm and ng(Angular-Cli) (Built tool)

Tags:

angular

In angularjs 2 what is main difference between NPM and NG (anglular-cli). If By NPM if we can built our application and it will work then what is the need of NG Built (angular-cli).

npm start vs ( ng serve or ng built)

like image 679
stackinfostack Avatar asked Oct 12 '16 10:10

stackinfostack


People also ask

What is the difference between npm and Ng?

NPM is basically a package manager which acts as a dependency provider. Similarly, YARN is another such example. NPM contains and manages many packages and modules, and NG is one such module which is a core module of Angular.

What is the difference between ng build and npm run build?

ionic build uses ng build internally. If you run ng build directly, Ionic hooks won't be triggered as it is bypassed. npm run build picks the "build" from package. json which is the same as ng build .

What is npm and Angular CLI?

The Angular Framework, Angular CLI, and components used by Angular applications are packaged as npm packages and distributed using the npm registry. You can download and install these npm packages by using the npm CLI client, which is installed with and runs as a Node. js® application.

Is AngularJS and Angular CLI same?

Angular CLI is a command line interface for writing or easily setting/building up an angular application. Angular js - is a older version of Angular (version 1. x) which is a open-source JavaScript-based front-end web application framework.


1 Answers

NPM is basically a package manager which acts as a dependency provider. If there are many small packages, required to build a large one, NPM is the one hotspot which will provide us with the packages. Angular-CLI is one of those packages. As far as NG is concerned, it is the core module of Angular. Whenever, an application is started,the NG module is loaded by deafult. The module itself contains the essential components for an AngularJS application to function.

Hope it helps!

like image 93
Doomed93 Avatar answered Oct 13 '22 00:10

Doomed93