title: Bind data to modal
body: <p>I am trying to pass some data with a function to display on a modal, yet the usual approaches to binding are not working, I was hoping someone could point me in the right direction.</p>
  
  <pre><code>  $scope.openModal = function (obj) {
  
  
      //$scope.data = {type: obj.type, descriptions: obj.description, isDone: obj.isDone, createDate: obj.createDate, priority: obj.priority};
  
      $scope.data = obj;
  
      console.log($scope.data);
  
      var modalInstance = $uibModal.open({
        animation: $scope.animationsEnabled,
        templateUrl: 'modalTemplate.html',
        controller: 'View1Ctrl',
        resolve: {
          data: function () {
            return $scope.data;
          }
        }
      });
    }
  </code></pre>
  
  <p><strong>Template</strong></p>
  
  <pre><code>&lt;!-- MODAL --&gt;
  
  
  &lt;div&gt;
  &lt;div ng-controller="View1Ctrl"&gt;
  &lt;script type="text/ng-template" id="modalTemplate.html"&gt;
          &lt;div class="modal-header"&gt;
              &lt;h3 class="modal-title"&gt;Item Details&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;ul&gt;
                  &lt;li&gt;Type: &lt;span ng-model="data.type"&gt;&lt;/span&gt;&lt;/li&gt;
                  &lt;li&gt;Description: &lt;span ng-model="data.description"&gt;&lt;/span&gt;&lt;/li&gt;
                  &lt;li&gt;Date: &lt;span ng-model="data.createDate"&gt;&lt;/span&gt;&lt;/li&gt;
                  &lt;li&gt;Priority: &lt;span ng-model="data.priority"&gt;&lt;/span&gt;&lt;/li&gt;
                  &lt;li&gt;Finished: &lt;span ng-model="data.isDone"&gt;&lt;/span&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
          &lt;button class="btn btn-primary" ng-click="$close()"&gt;OK&lt;/button&gt;
          &lt;/div&gt;
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Also tried {{data.type}} etc, and ng-bind. I now my $scope.data is populated because it is showing as much in the console.</p>