title: $mdDialog doesn't read from json
body: <p>I'm trying to bind data from a json to an mdDialog but it's not working. Hoping someone could see what I am missing here. The setup is complicated because the data s being accessed in several views. And there are a few other dependencies in play. But here is the relevant code</p>
  
  <p>Service</p>
  
  <pre><code>(function ()
  {
      'use strict';
  
      angular
          .module('app.scala-media')
          .factory('MediaService', MediaService);
  
      /** @ngInject */
      function MediaService($q, $mdToast, msApi) {
          var medias = [];
  
          var service = {
              getMedias     : getMedias
          };
  
          return service;
  
          function getMedias() {
             ...blah blah blah
          }
  
      }
  
  })();
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>(function() {
      'use strict';
  
      angular
          .module('app.scala-media')
          .controller('MediasController', MediasController);
  
      /** @ngInject */
      function MediasController(msApi, $mdDialog, $state, Medias, $scope, $document) {
          var vm = this;
  
          // Data
          vm.medias = Medias;
  
          //Methods            
          vm.deleteMediaDialog = deleteMediaDialog;
  
          function deleteMediaDialog(Medias, e) {
              showMediaDataDialog(Medias, e);
          }
  
          function showMediaDataDialog(Medias, e) {
              $mdDialog.show({
                  controller         : 'MediasController',
                  controllerAs       : 'vm',
                  templateUrl        : 'app/main/apps/scala-media/dialogs/delete/delete-dialog.html',
                  parent             : angular.element($document.body),
                  targetEvent        : e,
                  focusOnOpen        : false,
                  clickOutsideToClose: true,
                  locals             : {
                       Medias      : Medias
                  }
              });
          }
  
      }
  
  })();
  </code></pre>
  
  <p>And finally the module</p>
  
  <pre><code>(function ()
  {
      'use strict';
  
      angular
          .module('app.scala-media')
          .config(config);
  
      /** @ngInject */
      function config($stateProvider, $translatePartialLoaderProvider, msApiProvider, msNavigationServiceProvider)
      {
          // State
          $stateProvider
              .state('app.scala-media.medias', {
                  url      : '/medias',
                  views    : {
                      'content@app': {
                          templateUrl: 'app/main/apps/scala-media/views/medias/medias.html',
                          controller : 'MediasController as vm'
                      }
                  },
                  resolve  : {
                      Medias: function (MediaService)
                      {
                          return MediaService.getMedias();
                      }
                  },
                  bodyClass: 'media'
              })
  
          // Api
          msApiProvider.register('scala-media.medias', ['app/data/scala-media/medias.json']);
  
      }
  })();
  </code></pre>
  
  <p>In any other page where it works, I am accessing the name of a media like this <code>{{vm.media.name}}</code>...simple.</p>
  
  <p>Here is my HTML (for the dialog)</p>
  
  <pre><code>&lt;md-dialog-content ms-scroll&gt;
       &lt;p&gt;
          You just deleted {{vm.media.name}}
       &lt;/p&gt;
  &lt;/md-dialog-content&gt;
  </code></pre>
  
  <p>I don't think there is anything else that could help you. I am not getting any errors. I just don't get any data passing through</p>