Problems to inject a controller in Angular JS
<p>I try to define a controller for a dialog, as seen in the Angular Material examples (<a href="https://plnkr.co/edit/DlhNXU" rel="nofollow">https://plnkr.co/edit/DlhNXU</a>)</p>

<pre><code>var TestApp = angular.module('TestApp', ['ngMaterial']);

TestApp.controller('MainController', function MainController($scope, $mdDialog, $mdMedia, DialogController) {
    ...
    $mdDialog.show({
        controller: DialogController,
        ...
    });
    ...
}
</code></pre>

<p>But I always get this:</p>

<blockquote>
  <p>Error: [$injector:unpr] Unknown provider: DialogControllerProvider &lt;- DialogController &lt;- MainController</p>
</blockquote>