I've created an angular 5 components with @Input parameters. This component is a search panel with logics and html who are provided. The developer can display the search panel where he want and can dynamically inject the search method and the object type displayed.
As the type of data can be dynamically set, I wanted to give the possibility to specify the output string (selected values) but I cannot make it work. The idea would be to be able to give as input parameter:
<my-search-panel value="test" [searchMethod]="searchTest($event) outputExpression="value: {{test}}"/>
where the outputExpression parameter would be set into a div in the template:
<div>{{outputExpression}}</div>
But of course once the html is rendered I get the interpolation as text:
<div>value: {{test}}</div>
Does anyone know if there's a way to dynamically bind Angular interpolation into templates?
Thanks a lot and cheers, Frédéric