Angular:创建使用组件(二)

一、创建组件 1.创建一个 news组件 ng g component [组件目录/组件名称] ng g component components/news 2.在VS Code中查看项目结构 3.如果通过命令行创建组件,将自动在 app.module.ts 中引入 二、使用组件 1.在 app.component.html 中添加 news 组件 <!--The content below is
相关文章
相关标签/搜索