在component.ts文件里的export class里定义的数据:
export class AppComponent {
msg = ‘meNg’;
}
然后在html文件里:(把msg绑定到div自定义的title属性里)
div title="{{msg}}"></div
Angular属性绑定
最新推荐文章于 2024-01-16 17:03:11 发布
在component.ts文件里的export class里定义的数据:
export class AppComponent {
msg = ‘meNg’;
}
然后在html文件里:(把msg绑定到div自定义的title属性里)
div title="{{msg}}"></div