QQ图片20210128105937.png

  1. src
  2. --app
  3. # --app.module.ts //项目的根模块(App.vue),告诉angular如何组装应用。 根模块

一、使用动态数据

  1. //app.component.ts
  2. import { Component } from '@angular/core';
  3. @Component({
  4. selector: 'app-root',
  5. templateUrl: './app.component.html',
  6. styleUrls: ['./app.component.css']
  7. })
  8. export class AppComponent {
  9. title = 'my-app';
  10. }
  11. // app.component.html
  12. <div>{{title}}</div>