【发布时间】:2017-02-24 02:26:20
【问题描述】:
我在页面上有一个包含以下 div 的组件
<div style=" width:400; height:400; float:left">
<div style="background-color:red; width:50%; height:50%; float:left">
</div>
<div style="background-color:blue; width:50%; height:50%; float:right">
</div>
<div style="background-color:green; width:50%; height:50%; float:left">
</div>
<div style="background-color:orange; width:50%; height:50%; float:right">
</div>
</div>
我在同一页面上有另一个 div
<div class="eventBox eventBox__colorBar"></div>
当我点击上面的任何一个 div 时,我想获取选定的颜色并应用为第二个 div 的背景颜色。
angular2怎么办?
【问题讨论】:
标签: html angular typescript