Angular 创建组件
## 创建组件 1. 定义`hello.component.ts`组件 2. 在`app.module.ts`中引用并添加到`declarations`声明中 3. 在`app.component.html`中使用组件`
命令创建
- 安装
Angular 5 Snippets,输入命令ng-component自动生成组件结构 - 使用ng命令自动创建模块:
ng generate component component-name - 组件会自动加入到
declarations声明中

浙公网安备 33010602011771号