I want to call a variable dynamically.
export class AppComponent { my_a_variable = \'test a\'; my_b_variable = \'test b\'; type = \'a\'; // this var
Hope this works,
export class AppComponent { my_a_variable = 'test a'; my_b_variable = 'test b'; type = 'a'; }
In your template you can do like this,
<div>{{this['my_' + type + '_variable']}}</div>