I'm curious if Angular2 has a feature similar to the bracket notation in Javascript that allows you to use variables to select an object property, or if there is another method to achieve the same functionality.
Here is the code snippet for reference:
let selector = "foo";
let someObject = {foo: "some content", guu: "some other content"};
console.log(someObject[selector]); // using bracket notation, logs "some content"
In my attempts with Angular2:
{{someObject[selector]}}
{{someObject['selector']}}
Unfortunately, neither of these approaches worked. Is there an alternative way to achieve this without relying on Javascript?