code: function injectAttribute(attrNameToInject) {
      ngDevMode && assertPreviousIsParent();
      var lElement = getPreviousOrParentNode();
      ngDevMode && assertNodeType(lElement, 3 /* Element */);
      var tElement = lElement.tNode;
      ngDevMode && assertDefined(tElement, 'expecting tNode');
      var attrs = tElement.attrs;
      if (attrs) {
          for (var i = 0; i < attrs.length; i = i + 2) {
              var attrName = attrs[i];
              if (attrName === 1 /* SelectOnly */)
                  break;
              if (attrName == attrNameToInject) {
                  return attrs[i + 1];
              }
          }
      }
      return undefined;
  }
docs: Inject static attribute value into directive constructor.
  
  This method is used with `factory` functions which are generated as part of
  `defineDirective` or `defineComponent`. The method retrieves the static value
  of an attribute. (Dynamic attributes are not supported since they are not resolved
  at the time of injection and can change over time.)
  
  # Example
  Given:
  ```
  @Component(...)
  class MyComponent {
  constructor(@Attribute('title') title: string) { ... }
  }
  ```
  When instantiated with
  ```
  <my-component title="Hello"></my-component>
  ```
  
  Then factory method generated is:
  ```
  MyComponent.ngComponentDef = defineComponent({
  factory: () => new MyComponent(injectAttribute('title'))
  ...
  })
  ```
  
  @experimental