Closed fxck closed 6 years ago
the whole error is
ERROR TypeError: Cannot read property 'value' of undefined
at TICKETS_LIST_TITLE (eval at MessageFormat.compile (index.js:501), <anonymous>:26:40)
at TranslateDefaultParser.interpolateFunction (core.es5.js:2863)
at TranslateDefaultParser.interpolate (core.es5.js:2836)
at TranslateService.getParsedResult (core.es5.js:3267)
at TranslateService.get (core.es5.js:3314)
at TranslateDirective.updateValue (core.es5.js:3598)
at TranslateDirective.checkNodes (core.es5.js:3565)
at TranslateDirective.set [as translate] (core.es5.js:3511)
at updateProp (core.js:12619)
at checkAndUpdateDirectiveInline (core.js:12326)
using
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"ngx-translate-messageformat-compiler": "^3.0.0",
"messageformat": "^1.1.1"
*ngIf
doesn't have any effect on it, tried various versions of messageformat
.. nothing helped..
cc @lephyrus
here's replication of the error on stackblitz https://stackblitz.com/edit/ngx-translate-pluralization?file=app%2Fapp.component.html
I've briefly looked at this and done a bit of debugging. This is what I've found:
@ngx-translate/core
v9.0.0: it results in {value} foo
, but there's no error.In short, this is an issue in @ngx-translate/core
. I don't have time to look into this at the moment, maybe you can, @fxck.
@lephyrus I played around with it, I think ngx-translate is at fault here, it works fine with translate pipe, doesn't work with translate directive
I'm getting this error when I try to use any placeholder.
ie: