How to create angular 5 project in angular cli 6.0.1

前端 未结 2 626
無奈伤痛
無奈伤痛 2020-12-30 09:00

My angular cli version is 6.0.1 and node version is 8.11.1.

How to create or add a new project of angular

2条回答
  •  [愿得一人]
    2020-12-30 09:40

    I have found a good explanation and the steps how to do -

    https://blog.angularindepth.com/angular-5-or-angular-6-yes-please-d71b08b5e59b

    1) Install Angular 6 CLI globally:

    npm install -g @angular/cli@6
    

    2) Create a folder called ng5 to house all of your new Angular 5 applications:

    md ng5
    cd ng5
    

    3) In your ng5 folder create a new local npm application by using:

    npm init -y
    

    4) Install Angular 5 CLI locally using:

    npm install @angular/cli@1
    

    5) Now you MUST delete the local package.json file. If you don’t, Angular CLI will complain when you try use ng new. This is because it will think you are trying to create a new application inside an existing Angular CLI application.

    6) Create your new Angular 5 application:

    ng new my-ng5-app
    

提交回复
热议问题