function MdCompilerService($q, $templateRequest, $injector, $compile, $controller) {

    /**
     * @private @const
     * @type {!IQService}
     */
    this.$q = $q;

    /**
     * @private @const
     * @type {!ITemplateRequestService}
     */
    this.$templateRequest = $templateRequest;

    /**
     * @private @const
     * @type {!IInjectorService}
     */
    this.$injector = $injector;

    /**
     * @private @const
     * @type{!ICompileService}
     */
    this.$compile = $compile;

    /**
     * @private @const
     * @type {!IControllerService}
     */
    this.$controller = $controller;
  }
@ngdoc service
@name $mdCompiler
@module material.core.compiler
@description
The $mdCompiler service is an abstraction of AngularJS's compiler, that allows developers
to compile an element with options like in a Directive Definition Object.

> The compiler powers a lot of components inside of AngularJS Material.
> Like the `$mdPanel` or `$mdDialog` services.

@usage

Basic Usage with a template

<hljs lang="js">
  $mdCompiler.compile({
    templateUrl: 'modal.html',
    controller: 'ModalCtrl',
    locals: {
      modal: myModalInstance;
    }
  }).then(function (compileData) {
    compileData.element; // Compiled DOM element
    compileData.link(myScope); // Instantiate controller and link element to scope.
  });
</hljs>

Example with a content element

<hljs lang="js">

  // Create a virtual element and link it manually.
  // The compiler doesn't need to recompile the element each time.
  var myElement = $compile('<span>Test</span>')(myScope);

  $mdCompiler.compile({
    contentElement: myElement
  }).then(function (compileData) {
    compileData.element // Content Element (same as above)
    compileData.link // This does nothing when using a contentElement.
  });
</hljs>

> Content Element is a significant performance improvement when the developer already knows
> that the compiled element will be always the same and the scope will not change either.

The `contentElement` option also supports DOM elements which will be temporary removed and
restored at its old position.

<hljs lang="js">
  var domElement = document.querySelector('#myElement');

  $mdCompiler.compile({
    contentElement: myElement
  }).then(function (compileData) {
    compileData.element // Content Element (same as above)
    compileData.link // This does nothing when using a contentElement.
  });
</hljs>

The `$mdCompiler` can also query for the element in the DOM itself.

<hljs lang="js">
  $mdCompiler.compile({
    contentElement: '#myElement'
  }).then(function (compileData) {
    compileData.element // Content Element (same as above)
    compileData.link // This does nothing when using a contentElement.
  });
</hljs>