Hello
By clicking on the link:
<a href="" class="btn btn-info btn-block" ng-click="editarCliente(cliente)">
opens a modal ( bootstrap
) and should display the data contained in cliente
.
I'm using angular ui
Follow $scope
$scope.editarCliente = function($cliente) {
$scope.clienteEdit = {
CliNome: $cliente.cli_nome,
CliTelefone: $cliente.cli_telefone,
CliEmail: $cliente.cli_email,
CliDescricao: $cliente.cli_descricao
};
var modalInstance = $uibModal.open({
animation: $scope.animationsEnabled,
templateUrl: 'myModalContent.html',
controller: 'clienteController',
//size: size,
resolve: {
cliente: function () {
return $scope.clienteEdit;
}
}
});
Note: open the modal without problems:
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<h3 class="modal-title">Editar</h3>
</div>
<div class="modal-body">
<ul>
<li ng-repeat="item in items">
<a href="#" ng-click="$event.preventDefault(); selected.item = item">{{ item }}</a>
</li>
</ul>
Selected: <b>{{ clienteEdit.CliNome }}</b>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="ok()">Salvar</button>
<button class="btn btn-warning" type="button" ng-click="cancel()">Fechar</button>
</div>
But it does not display the content of $scope