When to use 'npm start' and when to use 'ng serve'?

后端 未结 5 1467
离开以前
离开以前 2020-12-02 05:19

ng serve serves an Angular project via a development server

 

npm start runs an ar

5条回答
  •  春和景丽
    2020-12-02 05:49

    There are more than that. The executed executables are different.

    npm run start
    

    will run your projects local executable which is located in your node_modules/.bin.

    ng serve
    

    will run another executable which is global.

    It means if you clone and install an Angular project which is created with angular-cli version 5 and your global cli version is 7, then you may have problems with ng build.

提交回复
热议问题