【发布时间】:2018-06-27 04:38:01
【问题描述】:
我正在尝试显示锦标赛树:
最初,我有很多喜欢:
<div class="match-wrapper"
style="top: {{ match['matchWrapperTop'] }}px; left: {{ match['matchWrapperLeft'] }}px; width: {{matchWrapperWidth}}px;">
但我明白了:
WARNING: sanitizing unsafe style value top: -72px; left: 168px; height: 54px; (see http://g.co/ng/security#xss).
现在,我试着改变它:
<div class="match-wrapper"
[ngStyle]="{top: match['matchWrapperTop'], left: match['matchWrapperLeft'], width: matchWrapperWidth}">
但现在,我有:
Cannot find a differ supporting object
而且这个错误不那么明显......
我该怎么办???
【问题讨论】: