1
I would like to know how to, when selecting a checkbox, take this data and launch it in a modal. In the code below, I want to take only the selected charters of a post and make appear only those selected in the modal. How do I? I tried to see in other tutorials, but I could not find something to help me. Thank you very much!
<div ng-repeat="charter in post.charters">
<input type="checkbox" ng-model="charter.selected"> {{'{{charter}}'}}
</div>
<div class="modal fade textfield" id="updatePopUp">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="exampleModalLabel" >Edit Post Components</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group form-inline">
<label for="txtComponent" class="control-label">Component:</label>
<input type="text" class="form-control" ng-model="post.components" id="txtComponent" autocomplete="off" placeholder="Insert a component">
<button ng-click="searchCharters(post.components)" type="button" class="btn btn-primary">See charters</button>
</div>
</form>
<ul>
<div ng-repeat="charter in post.charters">
{{'{{charter}}'}}
</div>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button ng-click="updatePost()" type="button" class="btn btn-primary">Update</button>
</div>
post a minimum example, please, the angular code? should be something simple to do, but to generate an example, we need yours, if not a generic example ...
– novic
I’m new at angular, man. I really have no idea what it would be like.
– Antonio Braz Finizola