I am developing my first Angular app and having trouble with string interpolation.
I have a component which contains the following element:
`<span>{{action.getText()}}</span>`
action is of Type Action which has the following method:
getText(): String { return "Test"; }
The variable action is defined correctly since I can access properties via {{}} without a problem. e.g. {{action.title}}
So my question is, is this even possible to access this function and if yes, what am I doing wrong?
actionlooks like? I usually usestringdatatype notStringget text() { return "Test"; }and{{action.text}}. Work only if the action object come from your component ts file or from a local variable defined with the # tag.get text() { return "Test";}and{{action.text}}in my component. But there is now no text shown (at least it doesn't crash anymore). The variable action is defined in the associated Component filestringandString?{{action.date.getMinutes()}}