首页 > 其他 > 详细

angular 中如何绑定属性

时间:2019-05-17 18:12:58      阅读:169      评论:0      收藏:0      [点我收藏+]
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">


  <h1>
    Welcome to {{ title }}
  </h1>

  <div [title] = "msg"> 鼠标放在我身上看看效果</div>
</div>

<router-outlet></router-outlet>
import { Component } from ‘@angular/core‘;

@Component({
  selector: ‘app-root‘,
  templateUrl: ‘./app.component.html‘,
  styleUrls: [‘./app.component.scss‘]
})
export class AppComponent {
  title = ‘Angulardemo‘;
  msg = ‘我是绑定的属性‘;
}

效果技术分享图片

angular 中如何绑定属性

原文:https://www.cnblogs.com/loaderman/p/10882832.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!