title: angular-strap modal - pass variable into the modal scope
body: <p>How to pass variable in angular-strap modal?</p>
  
  <p>Need to pass <code>item</code> params into the modal scope.</p>
  
  <p>example.html :</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="container" ng-controller="ExampleCtrl"&gt;
      &lt;br&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-sm-9 col-sm-offset-1"&gt;
              &lt;div class="row jumbotron" ng-repeat="item in items"&gt;
                  &lt;div class="col-sm-8"&gt;
                      &lt;h4&gt;{{item.name}}&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-2"&gt;
                        &lt;button type="button" class="btn btn-lg btn-danger" ng-click="showModal()"&gt;Custom Modal
                        &lt;br /&gt;
                        &lt;small&gt;(using data-template)&lt;/small&gt;
                      &lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <p>example.controller.js :</p>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  angular
      .module('MyApp')
      .controller('ExampleCtrl', ['$scope', '$modal',
          function ($scope, $modal) {
          var modal = $modal({
              scope: $scope,
              template: '../../views/example.tpl.html',
              show: false
          });
          $scope.showModal = function() {
              modal.$promise.then(modal.show);
          };
  }]);
  </code></pre>