Angular学习笔记:Angular CLI

定义

Angular CLI:The Angular CLI is a command line interface tool that can create a project, add files, and perform a variety of ongoing development tasks such as testing, bunding, and deployment.

总而言之,Angular CLI是一款功能很多的命令行工具。

环境

首先要安装Node.js和npm

然后使用如下命令全局安装Angular CLI  npm install -g @angular/cli 

常用命令

创建一个名为my-app的项目

ng new my-app

启动项目(需在项目录下,其中 --open 选项会自动打开你的浏览器http://localhost:4200)

ng serve --open

创建一个名为heroes的组件

ng generate component heroes

猜你喜欢

转载自www.cnblogs.com/colin220/p/9404201.html