clearNextLangAndPromise = function (key) {
      if ($nextLang === key) {
        $nextLang = undefined;
      }
      langPromises[key] = undefined;
    }
@ngdoc method
@name $injector#instantiate
@description
Create a new instance of JS type. The method takes a constructor function, invokes the new
operator, and supplies all of the arguments to the constructor function as specified by the
constructor annotation.

@param {Function} Type Annotated constructor function.
@param {Object=} locals Optional object. If preset then any argument names are read from this
object first, before the `$injector` is consulted.
@returns {Object} new instance of `Type`.