code: function baseDirectiveCreate(index, directive, directiveDef) {
      ngDevMode &&
          assertEqual(viewData[BINDING_INDEX], -1, 'directives should be created before any bindings');
      ngDevMode && assertPreviousIsParent();
      Object.defineProperty(directive, NG_HOST_SYMBOL, { enumerable: false, value: previousOrParentNode });
      if (directives == null)
          viewData[DIRECTIVES] = directives = [];
      ngDevMode && assertDataNext(index, directives);
      directives[index] = directive;
      if (firstTemplatePass) {
          var flags = previousOrParentNode.tNode.flags;
          if ((flags & 4095 /* DirectiveCountMask */) === 0) {
              // When the first directive is created:
              // - save the index,
              // - set the number of directives to 1
              previousOrParentNode.tNode.flags =
                  index << 14 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;
          }
          else {
              // Only need to bump the size when subsequent directives are created
              ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');
              previousOrParentNode.tNode.flags++;
          }
      }
      else {
          var diPublic = directiveDef.diPublic;
          if (diPublic)
              diPublic(directiveDef);
      }
      if (directiveDef.attributes != null && previousOrParentNode.tNode.type == 3 /* Element */) {
          setUpAttributes(previousOrParentNode.native, directiveDef.attributes);
      }
      return directive;
  }
docs: A lighter version of directiveCreate() that is used for the root component
  
  This version does not contain features that we don't already support at root in
  current Angular. Example: local refs and inputs on root component.