Corner installation

I want to install Angular version 4. * on my windows 7.
I am currently using Angular version 1.6. *

I have tried the following command

npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}@next --save

      

But its not working

Can anyone help me install and build my Angular 4 project.

+4


source to share


10 answers


  • Make sure node version is higher than 6.9 and npm is higher than 3
  • Check the version with node --version and npm -version
  • Install angular cli using npm install -g @ angular / cli
  • -g installs the angular global system on your system and you just need to run this command only once
  • Create angular project using 'ng new angularprojectname
  • Go to this project folder and check the angular version for 'ng -v
  • Upgrade this version to angular 4 by running this command -

    For Windows- npm install @ angular / common @next @ angular / compiler @next @ angular / compiler-cli @next @ angular / core @next @ angular / forms @next @ angular / http @next @ angular / platform-browser @ next @ angular / platform-browser-dynamic @next @ angular / platform-server @next @ angular / router @next @ angular / animations @next --save

For Linux / Mac- npm install @ angular / {common, compiler, compiler-cli, core, forms, http, platform-browser, platform-browser-dynamic, platform-server, router, animations} @next --save

Be sure to update your typescript version by running the command - npm install typescript @ 2.2.1 --save



Ignore all warnings it shows and now check angular version to 'ng -v Version changed from 2.2.4 to 4.1.0

You can also check all information about your angular cli in package.json file.

+22


source


You just need to install npm -g install angular-cli

And write sudo if you are using mac or ubantu

Then go to the directory where you want the project and then a new new PROJECTNAME



The project will be created

Hope this helps you

+3


source


You can reference this to follow all Angular 4 steps

https://www.youtube.com/watch?v=yAJ05021nro

Steps below:

node -v

npm -v

  • Open a terminal window in that folder (shif + right click for the window). ng new my-app

  • Go to your project directory and start the server.

    cd my-app (go to folder project)

ng serve --open

+2


source


I also encountered the same issue when installing.

Please do check npm and nodejs version and update them .

I would recommend node v6.xx and npm 4.xx or higher

0


source


If you are looking for the latest version of angular use this command to install

npm -g install @ angular / cli

0


source


There are many ways to structure AngularJS applications. When you start upgrading these apps to Angular, some of them will be much easier to work with than others. There are several key techniques and patterns that you can apply to future applications before migrating.

  • Follow AngularJS Style Guide
  • Using the module loader
  • Switching to TypeScript
  • Using component directives

  • Upgrading with ngUpgrade

Or can follow the official Angular doc

0


source


Follow these simple steps to install Angular 4:

  • Install node.js and npm (required dependencies. Npm is automatically installed when you install node.js). You can install it from here
  • Install Angular CLI using npm. Enter the following command at the command line: npm install -g @ angular / cli
  • If you are still facing some problems, you need to install git. You can install it from here
  • Now, to create an Angular 4 project using Angular CLI, enter the following command: ng new [Project_Name] This will create an Angualr 4 project. 5. To start the server and get your project up and down, type in the command line: ng serve

Remember that you must be inside the project folder before starting the server. Hope this helps.

0


source


You have several libraries like

angular-material, angular-cdk`

      

etc .... Add all those and try. This will work for sure. And you should be able to run the project

0


source


Install angular cli globally.

npm install -g @angular/cli

Get git pull from repository: -

[ https://github.com/blazehub/ng-cli-starter.git]

to prepare a finished project of a finished project structure.

0


source


I am adding this to update the answer.

If you want to install the latest angular version, the other answers are for you.

If you want to install a specific version of angular ( enter your version number here ) you must use the below command.

npm install -g @angular/cli@VERSION_NUMBER

      

for example if you want to install angular command 1.4.9 should be like below

npm install -g @angular/cli@1.4.9

      

0


source







All Articles