Interface WebComponentService


@JsType(isNative=true, name="ng.WebComponentService", namespace="<global>") public interface WebComponentService
Public AngularTS WebComponentService contract exposed through the global ng namespace for Closure-annotated applications.
  • Method Details

    • createElementScope

      <T> jsinterop.base.JsPropertyMap<Object> createElementScope(elemental2.dom.HTMLElement host, T initialState, ElementScopeOptions options)
      Create and attach a normal AngularTS child scope for a custom element.
      Parameters:
      host - Value supplied for the host parameter.
      initialState - Value supplied for the initialState parameter.
      options - Value supplied for the options parameter.
      Returns:
      Method result.
    • defineAppComponent

      <T> Object defineAppComponent(String name, AppComponentOptions<T> options)
      Define an options-backed application host custom element.
      Parameters:
      name - Value supplied for the name parameter.
      options - Value supplied for the options parameter.
      Returns:
      Method result.
    • defineElement

      <T> Object defineElement(String name, ScopeElementConstructor<T> elementClass)
      Define a native custom element backed by an AngularTS child scope.
      Parameters:
      name - Value supplied for the name parameter.
      elementClass - Value supplied for the elementClass parameter.
      Returns:
      Method result.