1. 程式人生 > >angularjs彈出框方法一

angularjs彈出框方法一

觸發事件:用id控制

<button class="btn-cancel" data-toggle="modal" data-target="#myModal">取消申請</button>
<!-- 模態框(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">
				<!-- 關閉按鈕 -->
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					×
				</button>
				<!-- 標題 -->
				<h3 class="modal-title" data-ng-bind='results.title'></h3>
				<!-- <h4 class="modal-title" id="myModalLabel">
					模態框(Modal)標題
				</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">確定</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">關閉</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>