I need a Base64 value converter, since it is a cross-cutting concern and given how short is the toView implementation I declare it as a inline global resource:
But the production build does not work: Cannot determine default view strategy for object.
class{toView(e){return window.btoa(e)}}
I know that I can declare the value converter in a specific file and reference it with Plaform.moduleName but I’d rather not have a specific file for this one line converter. Is there any other way ?
I think that you might need to use the @valueConverter decorator. If you are keen on using the inline construct, then you might need to use the decorator like a function: valueConverter(class ... { /*..*/ }).