title: How to transclude content in ui bootstrap modal directive
body: <p>I've made a custom directive on top of ui bootstrap modal directive so I can use the same modal template everywhere in my app.</p>
  <p>My directive works until I try to transclude its content into the template:</p>
  <p><a href="http://plnkr.co/edit/YPESA3?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/YPESA3?p=preview</a></p>
  <hr />
  <h3>From index.html</h3>
  <pre><code>&lt;div ng-controller=&quot;ModalDemoCtrl&quot;&gt;
    &lt;button class=&quot;btn&quot; ng-click=&quot;open()&quot;&gt;Open me!&lt;/button&gt;
    
    &lt;my:modal open=&quot;shouldBeOpen&quot; close=&quot;close()&quot;&gt;
      &lt;h1&gt;Content&lt;/h1&gt;
    &lt;/my:modal&gt;
  &lt;/div&gt;
  </code></pre>
  <h3>Module code:</h3>
  <pre><code>angular.module('plunker', ['ui.bootstrap'])
  
  .controller('ModalDemoCtrl', function($scope) {
    $scope.open = function () {
      $scope.shouldBeOpen = true;
    };
  
    $scope.close = function () {
      $scope.closeMsg = 'I was closed at: ' + new Date();
      $scope.shouldBeOpen = false;
    };
  
    $scope.items = ['item1', 'item2'];
  
  })
  
  
  .directive('myModal', function() {
    return {
      restrict : 'E',
      templateUrl: 'myTpl.html',
      //transclude: true,
      scope : {
        open : '=',
        close : '&amp;'
      }
    };
  });
  </code></pre>
  <h3>Modal template:</h3>
  <pre><code>&lt;div modal=&quot;open&quot;&gt;
      &lt;div class=&quot;modal-header&quot;&gt;
          &lt;h4&gt;I'm a modal!&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class=&quot;modal-body&quot;&gt;
        &lt;!--&lt;div ng-transclude/&gt;--&gt;
      &lt;/div&gt;
         
      
      &lt;div class=&quot;modal-footer&quot;&gt;
        &lt;button class=&quot;btn btn-warning cancel&quot; ng-click=&quot;close()&quot;&gt;Cancel&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Uncomment transclude property from the directive and the template and you'll see you get a <code>TypeError: undefined is not a function.</code></p>
  <p>I can't figure what I'm doing wrong.</p>