show/hide components
You can use Bracket Notation to have custom object key by ['text'+variable].

vm.showComponent = function(componentName)
{
   hideComponents();
   vm['show' + componentName]=true;
}