I have a collapse and another one on the side, I wanted to click on one, close the other if it was open.
My html code:
angular.module("seuCondominio", ['ui.bootstrap']);
angular.module("seuCondominio").controller("seuCondominioCtrl", function($scope) {
$scope.isCollapsed = true;
$scope.isCollapsededit = true;
$scope.tarefas = [{
id: 0,
nome: "Lavar alguma coisa",
inicio: "10/10/10",
conclusao: "11/10/10",
custo: "1000",
status: {
nome: "Concluído"
}
}]
});
<html ng-app="seuCondominio">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.13/angular.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.13.0.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body ng-controller="seuCondominioCtrl">
<div id="editar">
<button id="lapis" class="btn btn-default" ng-click="isCollapsededit = !isCollapsededit">Simbolo</span>
</button>
<button class="btn btn-default" ng-click="isCollapsed = !isCollapsed"><span class="glyphicon glyphicon-chevron-right"></span>{{' ' + tarefas[0].nome}}</button>
<div collapse="isCollapsededit" style="position:relative">
Conteudo 1
</div>
</div>
<div collapse="isCollapsed" style="position:relative">
Conteudo 2
</div>
</div>
</html>
</body>