title: Pass input value to $mdDialog
body: <p>I'm trying to pass a form input to my dialog (as title for example). The problem is: it don't get the form <code>$scope</code>.</p>
  
  <p>If I set the <code>$scope</code> sinde the controller, it'll display normaly (see the <code>$scope.text</code> for example). But, if I try to get the form <code>$scope</code> (see `$scope.taskTitle) it just don't show anything. See my code:</p>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>app.controller('tasksCtrl', ['$scope', '$mdDialog',  function($scope, $mdDialog){
  
  
  $scope.teste = 'Just a test, dude';
  
  $scope.expandTask = function() {
  
      $mdDialog.show({
          clickOutsideToClose: true,
          controller: DialogController,
          scope: $scope,
          preserveScope: true,
          templateUrl: 'models/dialog.tmpl.php',
          locals: {
              id: $scope.tasklist.id,
              title: $scope.taskTitle
          }
      });
  
  }
  
  function DialogController($scope, $mdDialog, id, title) {
  
      $scope.id = id;
      $scope.title = title;
  
      $scope.hide = function() {
          $mdDialog.hide();
      };
  
      $scope.cancel = function() {
          $mdDialog.cancel();
        };
  }
  }]);
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="input-container float-icon" flex="100" layout="row" ng-repeat="task in tasklist"&gt;
      &lt;md-input-container flex="100"&gt;
          &lt;label&gt;New Task...&lt;/label&gt;
          &lt;input type="text" ng-model="taskTitle" name="taskTitle"&gt;
          &lt;md-button aria-label="Expandir Tarefa" class="md-icon-button expand-icon" ng-click="expandTask()"&gt;
              &lt;md-tooltip hide-sm&gt;Expand Task&lt;/md-tooltip&gt;
              &lt;i class="fa fa-expand"&gt;&lt;/i&gt;
          &lt;/md-button&gt;
      &lt;/md-input-container&gt;
  
      {{taskTitle}}
  
  &lt;/div&gt;
  </code></pre>