我想从角度为2的for循环中的变量中添加html代码:
<ul>
<li *ng-for="#c of myHtmlItems">
{{c.myHtml}}
</li>
</ul>
html仅作为字符串添加
答案 0 :(得分:4)
#
let
已替换为[innerHTML]='c.myHtml'
inner-html="{{c.myHtml}}
而不是Option Explicit
Sub main()
Dim bottom As Long, top As Long, lastColumn As Long, iCol As Long
bottom = 275
top = 1600
lastColumn = 20 '<-- specify last column index or get it through some function
For iCol = 4 To lastColumn '<--| loop through columns from 4 to lastColumn
With Cells(5, iCol).Resize(, 3) '<--| reference three contiguous cells in the same row from current one
.Select
Select Case True
Case WorksheetFunction.Min(.value) < bottom '<--| there's one value too small
MsgBox "small!"
' do something
Case WorksheetFunction.Max(.value) > top '<--| there's one value too big
MsgBox "big!"
' do something
Case Else '<--| all value in range
MsgBox "ok!"
' do something
End Select
End With
Next iCol
End Sub
)答案 1 :(得分:2)
<ul>
<li *ng-for="#c of myHtmlItems" inner-html="{{c.myHtml}}></li>
</ul>
答案 2 :(得分:-2)
而不是ng-for,尝试使用ng-repeat。因为大多数ng-repeat在非常不同的方面很有用
<ul>
<li ng-repeat="element in myHtmlItems">
{{element}}
</li>
</ul>