I need to click on each BTN to open a content with information, in the example each click open the 3 contents, how do I make this click dynamic and each button open its contents, open one at a time, similar to behavior a tooltip.
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.abreConteudo = false;
$scope.funcaoClicar = function() {
$scope.abreConteudo = true;
};
});
.box {
margin-top: 50px;
display: inline-block;
min-width: 80px;
}
<html lang="pt" ng-app="myApp">
<body ng-controller="myCtrl">
<section class="box">
<button ng-click="funcaoClicar()">Botão 1</button>
<div ng-show="abreConteudo">Conteúdo 1</div>
</section>
<section class="box">
<button>Botão 2</button>
<div ng-show="abreConteudo">Conteúdo 2</div>
</section>
<section class="box">
<button>Botão 3</button>
<div ng-show="abreConteudo">Conteúdo 3</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
</body>
</html>