1
是否可以在ng-if中評估角度表達式?在ng-if指令中使用角度表達式
例如:
<div ng-if="itemData.contentTypeId = {{$root.res('resources', article_type_id')}}">
<!-- some content -->
<div>
也試過圍繞表達的單引號:
<div ng-if="itemData.contentTypeId = '{{$root.res('resources', article_type_id')}}'">
<!-- some content -->
<div>
既不擔任預期。
這是語法問題還是這不可能?如果這是一個語法問題,那麼應如何編寫上面的語句?
你試過用''==而不是'='? –