title: ngDialog in ES6 Angular 1.5 controller
body: <p>I'm trying to rewrite my Angular 1.5 code to ES6. I'm using <code>ng-dialog</code> and I'm importing it but not injecting it into the controller as I'm trying to make it a dependency of the module itself. I have the following code:</p>
  
  <pre><code>import angular from 'angular';
  import ngDialog from '../libraries/ng-dialog';
  
  const template = `&lt;div&gt;
          &lt;button ng-click="ctrl.openTheDialog()"&gt;Click Me&lt;/button&gt;
      &lt;/div&gt;`;
  
  class MyController {
      constructor($scope) {
          'ngInject';
          this.$scope = $scope;
      }
  
      openTheDialog() {
          ngDialog.open({
              template: templateUrl,
              scope: this.$scope
          });
      }
  }
  
  angular.module('myApp', ['ngDialog'])
      .component('myComponent', {
          template: template,
          controllerAs: 'ctrl',
          controller: MyController
      });
  </code></pre>
  
  <p>When I click the button, I get an error message that <code>open</code> is not a function. I'm not really sure where I made the mistake here. Can someone help point out the error? Thanks!</p>