In a view I have 2 div. At the beginning you should see one but when you click on a button this should hide and show the second div that is hidden at the beginning.
First div that should be displayed at the beginning
<div class="md-card-content" ng-controller="solicitudcomprasCtrl as showCase" ng-show="formVisibility">
</div>
Second div that at the beginning is hidden
<div id="div_agregarProducto" ng-show="agregarProducto">
</div>
Here the button
<a ng-show="formVisibility" ng-click="showCase.edit(showCase.item[' + data.id + '])"><i class="md-icon material-icons md-bg-teal-900 uk-text-contrast"></i></a>
At the moment I can hide the div "formVisibility" being this the first div, in this way access to the edit function:
$scope.formVisibility = true;
$scope.agregarProducto = false;
function edit(item){
console.log("Ocultar Div");
$scope.agregarProducto = true;
$scope.formVisibility = false;
$scope.item = item;
}
But I can not make it show the second div that is the "addProduct" since this action must be done with the same button, which another solution could apply
Thank you.