DEV/ANGULAR
파이프에 파라미터로 객체 넘길때 에러 Parser Error: Missing expected } at the end of the expression
Guitaryc
2017. 8. 10. 13:13
반응형
Angular에 파이프를 만들어서 객체를 넘겼는데 }를 빼먹었따고 아래와 같이 에러가 난다.
Parser Error: Missing expected } at the end of the expression
코드
<p>{{coinRow?.coins.dash.price|currencyExchange:{myCurrency:myCurrency,
currency:coinRow?.coins.currencies,exchangeRate:exchangeRate}}}</p>
Angular github 이슈에 보니 이미 올라온 이슈 .
해결법은 아래와같이 뒤에 객체와 칸을 뛰어준다.
<p>{{coinRow?.coins.dash.price|currencyExchange:{myCurrency:myCurrency,
currency:coinRow?.coins.currencies,exchangeRate:exchangeRate} }}</p>
반응형