I get the error: core.js:...<h2>{{event.role | lowercase}}</h2>
You need to use quotes around the expression, otherwise angular will not be able to parse your expressionsrc
Or
<img src={{event.eventName | lowercase}} alt="">
core.js:6237 ERROR DOMException:
Failed to execute 'setAttribute' on 'Element': '|' is not a valid attribute name.
{{event.eventName}}
To use pipes with variables that are bound to properties, you could wrap it in a container with a
它不能识别管道,然而,不使用管道是正确的,所以格式为:
<img src="{{ event.eventName | lowercase }}" alt=""
缝隙工作。我应该怎么做?
<img [src]="event.eventName | lowercase" alt=""
如果我这样做。*ngIf
{{事件角色