我的 html 中有这个三元运算符(工作正常)
{{ qp.QP_TRANSFERS === '1' ? qp.QP_TRANSFER_TYPE_NAME + ' transfer' : 'No transfer' }}
我正在使用来自 json 对象的翻译服务。这是 en_US.json 文件的示例:
"myquotes": {
"PAGETITLE": "My quotes",
"DESCRIPTION": "List of all your asked quotes",
"packages": {
"label": {
"SEARCH": {
"TITLE": "Package quotes",
"DESCRIPTION": "Search by any column",
"QUOTE": "Quote",
"ADULTS": "Adults",
"MINORS": "Minors",
"TRANSFER": "transfer",
"NOTRANSFER": "No transfer"
}
},
}
}
我像这样使用它:
{{ 'myquotes.packages.label.ADULTS' | translate }}
有没有办法在我的三元示例中使用此服务?