<span ng-show="ttype=='val'">
    <span edit-in-place-var-value="value" type="type"></span>
</span>
<span ng-show="ttype=='var'">
    <span select-variable="value" select-vars="vars" type="type" class="select"></span>
</span>

<button class="btn btn-xs btn-warning" ng-click="alternate()"><i class="fa fa-exchange"></i></button>