1-1 创建组件(命令创建)
https://www.angular.cn/guide/component-overviewng g component <component-name>
Tips:每创建一个组件都会在app.module.ts文件中导入,注册
ng g component components/MovieItem
## app.module.tsimport { MovieItemComponent } from './components/movie-item/movie-item.component';@NgModule({/* 配置(声明)当前项目运行依赖的组件 */declarations: [AppComponent,MovieItemComponent],})
创建组件(vscode插件创建)
Angular FilesAngular Snippets
1-2 组件使用(app.component.html)
<app-movie-item></app-movie-item>
