Skip to content

Instantly share code, notes, and snippets.

@magnet88jp
Created November 3, 2014 11:46
Show Gist options
  • Save magnet88jp/5ee7f8642cfff30fffd6 to your computer and use it in GitHub Desktop.
Save magnet88jp/5ee7f8642cfff30fffd6 to your computer and use it in GitHub Desktop.
trial of angular-ui modal
<!DOCTYPE html >
<html ng-app="app">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/angular.min.js"></script>
<script src="js/ui-bootstrap-tpls-0.11.2.min.js"></script>
</head>
<body ng-controller="AppCtrl">
<h1>angular-modal</h1>
<div ng-click="openModal()">test</div>
<script>
var app = angular.module('app',['ui.bootstrap']);
app.controller('AppCtrl', function($scope, $modal) {
$scope.openModal=function() {
$modal.open({
templateUrl: "html/sub1.html",
controller: "ModalInstanceCtrl",
scope: $scope,
backdrop: 'static'
});
};
});
app.controller('ModalInstanceCtrl', function ($scope) {
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment