var app = angular.module('ozkary', ['ui.bootstrap']);
app.controller('MainCtrl',['$scope','$modal',function($scope,$modal) {
$scope.name = 'by ozkary.com';
var ctrl = this;
$scope.openDialog = function(sz) {
var modalInstance = $modal.open({
templateUrl: 'my-dialog',
size: sz
});
}
}]);
<!DOCTYPE html>
<html ng-app="ozkary">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<script data-require="angular.js@1.3.x" src="https://code.angularjs.org/1.3.15/angular.js" data-semver="1.3.15"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<div class="text-center">
<h3>AngularJS Modal Dialog</h3>
<button class="btn btn-info" ng-click="openDialog('')">
<i class="fa fa-check"></i> No Size
</button>
<button class="btn btn-success" ng-click="openDialog('sm')">
<i class="fa fa-check "></i> Small (sm)
</button>
<button class="btn btn-warning" ng-click="openDialog('lg')">
<i class="fa fa-check fa-2x"></i> Large (lg)
</button>
</div>
<script type="text/ng-template" id="my-dialog">
<div>
<div class="modal-header">
<h3>Hi Dialog by ozkary</h3>
</div>
<div class="modal-body">
<table width="780px;"><tr><td>Hello by ozkary.com</td></tr></table>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="$close()">OK</button>
<button class="btn btn-warning" ng-click="$dismiss()">Cancel</button>
</div>
</div>
</script>
</body>
</html>
/* Put your css in here */