Edit in JSFiddle

angular.module('MyApp', ['ui.bootstrap']);
var ModalController = function ($scope) {

  $scope.open = function () {
    $scope.isOpen = true;
  };

  $scope.close = function () {
    $scope.isOpen = false;
  };
};

<div ng-controller="ModalController">
    <button class="btn" ng-click="open()">Click to Open Modal</button>
    <div modal="isOpen" close="close()">
        <div class="modal-header">
            <h4>Modal</h4>
        </div>
        <div class="modal-body">
            Name: <input type="text" autofocus>
        </div>
        <div class="modal-footer">
            <button class="btn btn-warning cancel" ng-click="close()">Cancel</button>
        </div>
    </div>
</div>

              

External resources loaded into this fiddle: