1. ホーム
  2. Angular

angularjs ポップアップボックスの方法1

2022-02-18 21:45:42

トリガーイベント:ID付きコントロール

<button class="btn-cancel" data-toggle="modal" data-target="#myModal">Cancel request</button>

<! -- Modal box (Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby=" myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<! -- Close button -->
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					×
				</button>
				<! -- title -->
				<h3 class="modal-title" data-ng-bind='results.title'></h3>
				<! -- <h4 class="modal-title" id="myModalLabel">
					Modal box (Modal) title
				</h4> -->
			</div>
			<div class="modal-body">
				<b data-ng-bind='results.message'></b>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" data-ng-click="ok()" data-dismiss="modal"> determine</button>
				<button type="button" class="btn btn-default" data-dismiss="modal"> close</button>
			</div>
		</div><! -- /.modal-content -->
	</div><! -- /.modal -->
</div>

<! -- Modal box (Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby=" myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<! -- Close button -->
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					×
				</button>
				<! -- title -->
				<h3 class="modal-title" data-ng-bind='results.title'></h3>
				<! -- <h4 class="modal-title" id="myModalLabel">
					Modal box (Modal) title
				</h4> -->
			</div>
			<div class="modal-body">
				<b data-ng-bind='results.message'></b>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" data-ng-click="ok()" data-dismiss="modal"> determine</button>
				<button type="button" class="btn btn-default" data-dismiss="modal"> close</button>
			</div>
		</div><! -- /.modal-content -->
	</div><! -- /.modal -->
</div>