I'm working on an app that allows users to submit posts for review. When a user clicks the add post button, I have a Bootstrap modal pop up to confirm their choice. Within this modal, there is a "confirm" button that should trigger a function.
Strangely, this button doesn't seem to work when placed inside the modal. However, it works perfectly fine when placed outside of the modal but within the body tag.
Take a look at the code snippet below:
<button type="submit" id="createPostBtn" class="btn btn-default" data-toggle="modal" data-target="#confirmModal">CONFIRM & SEND POST</button>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-default" ng-click="addPost('<%= uid %>')">Confirm</button>
</div>
I'm at a loss here. Any help or insights you can provide would be greatly appreciated!