lib/di.js
function addInject(obj, inject) {
    if(!exists(inject)) {
      return;
    }

    var injectMe;

    if (inject === '$injector') {
      injectMe = new di.Inject(di.Injector);
    } else if (isObject(inject)) {
      if(isString(inject.inject)){
        injectMe = new di.Inject(inject.inject);
      } else if(isString(inject.promise)) {
        injectMe = new di.InjectPromise(inject.promise);
      } else if(isString(inject.lazy)) {
        injectMe = new di.InjectLazy(inject.lazy);
      }
    } else {
      injectMe = new di.Inject(inject);
    }

    di.annotate(obj, injectMe);
  }
function addInject(obj, inject) {
    if(!exists(inject)) {
      return;
    }

    var injectMe;

    if (inject === '$injector') {
      injectMe = new di.Inject(di.Injector);
    } else if (isObject(inject)) {
      if(isString(inject.inject)){
        injectMe = new di.Inject(inject.inject);
      } else if(isString(inject.promise)) {
        injectMe = new di.InjectPromise(inject.promise);
      } else if(isString(inject.lazy)) {
        injectMe = new di.InjectLazy(inject.lazy);
      }
    } else {
      injectMe = new di.Inject(inject);
    }

    di.annotate(obj, injectMe);
  }
function addInject ( obj , inject ) { if ( ! exists ( inject ) ) { return ; } var injectMe ; if ( inject === '$injector' ) { injectMe = new di . Inject ( di . Injector ) ; } else if ( isObject ( inject ) ) { if ( isString ( inject . inject ) ) { injectMe = new di . Inject ( inject . inject ) ; } else if ( isString ( inject . promise ) ) { injectMe = new di . InjectPromise ( inject . promise ) ; } else if ( isString ( inject . lazy ) ) { injectMe = new di . InjectLazy ( inject . lazy ) ; } } else { injectMe = new di . Inject ( inject ) ; } di . annotate ( obj , injectMe ) ; }
Add Inject Annotation
@private
@param {*} obj
@param {string|object} inject
Add Inject Annotation