Angular常用命令

一. Angular常用命令

1. ng new 文件夹名 (新建项目,选择y使用路由)

2. ng serve --open (默认浏览器运行项目)

3. ng serve --port 6060  (运行多个项目在不同端口)

4. ng g (提示能创建的各种东西)

5. ng g component components/news

(在app下生成components文件和news组件并自动导入组件至app.module.ts)

posted @ 2020-02-22 14:37  对·味  阅读(175)  评论(0编辑  收藏  举报