In an angular controller I have:
var stringTemplate = "{{data.a}} - {{data.b}}";
var data = {a: "example1", b: "example2"};
Is there a way to replace the expressions in stringTemplate with static values from data. So in this case the result should be "example1 - example2".
I need to store this in a database and use later when data is not available.
Values in data and stringTemplate will change.