Interface Component<TControllerInstance,TScopeInstance,TElement>


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

    Modifier and Type
    Method
    Description
    static <TControllerInstance, TScopeInstance, TElement>
    Component<TControllerInstance,TScopeInstance,TElement>
     
    jsinterop.base.JsPropertyMap<String>
    Define DOM attribute binding to component properties.
    Public Component.controller member exposed by the AngularTS namespace contract.
    An identifier name for a reference to the controller.
    jsinterop.base.JsPropertyMap<String>
    Requires the controllers of other directives and binds them to this component's controller.
    html template as a string or a function that returns an html template as a string which should be used as the contents of this component.
    Path or function that returns a path to an html template that should be used as the contents of this component.
    Whether transclusion is enabled.
    Programmatic real-DOM view factory.
    boolean
    Replaces the generated component host element with the component template.
    void
    setBindings(jsinterop.base.JsPropertyMap<String> bindings)
    Define DOM attribute binding to component properties.
    void
    setController(Object controller)
    Public Component.controller member exposed by the AngularTS namespace contract.
    void
    setControllerAs(String controllerAs)
    An identifier name for a reference to the controller.
    void
    setReplace(boolean replace)
    Replaces the generated component host element with the component template.
    void
    setRequire(jsinterop.base.JsPropertyMap<String> require)
    Requires the controllers of other directives and binds them to this component's controller.
    void
    setTemplate(Object template)
    html template as a string or a function that returns an html template as a string which should be used as the contents of this component.
    void
    setTemplateUrl(Object templateUrl)
    Path or function that returns a path to an html template that should be used as the contents of this component.
    void
    setTransclude(Object transclude)
    Whether transclusion is enabled.
    void
    Programmatic real-DOM view factory.
  • Method Details

    • create

      @JsOverlay static <TControllerInstance, TScopeInstance, TElement> Component<TControllerInstance,TScopeInstance,TElement> create()
    • getBindings

      @JsProperty jsinterop.base.JsPropertyMap<String> getBindings()
      Define DOM attribute binding to component properties. Component properties are always bound to the component controller and not to the scope.
    • getController

      @JsProperty Object getController()
      Public Component.controller member exposed by the AngularTS namespace contract.
    • getControllerAs

      @JsProperty String getControllerAs()
      An identifier name for a reference to the controller. If present, the controller will be published to its scope under the specified name. If not present, this will default to '$ctrl'.
    • getRequire

      @JsProperty jsinterop.base.JsPropertyMap<String> getRequire()
      Requires the controllers of other directives and binds them to this component's controller. The object keys specify the property names under which the required controllers (object values) will be bound. Note that the required controllers will not be available during the instantiation of the controller, but they are guaranteed to be available just before the onInit method is executed!
    • getTemplate

      @JsProperty Object getTemplate()
      html template as a string or a function that returns an html template as a string which should be used as the contents of this component. Empty string by default. If template is a function, then it is injected with the following locals: $element - Current element Use the array form to define dependencies.
    • getTemplateUrl

      @JsProperty Object getTemplateUrl()
      Path or function that returns a path to an html template that should be used as the contents of this component. If templateUrl is a function, then it is injected with the following locals: $element - Current element Use the array form to define dependencies.
    • getTransclude

      @JsProperty Object getTransclude()
      Whether transclusion is enabled. Disabled by default.
    • getView

      Programmatic real-DOM view factory. It runs during linking after controller bindings and `onInit`, and is mutually exclusive with template, templateUrl, and replace.
    • isReplace

      @JsProperty boolean isReplace()
      Replaces the generated component host element with the component template.
    • setBindings

      @JsProperty void setBindings(jsinterop.base.JsPropertyMap<String> bindings)
      Define DOM attribute binding to component properties. Component properties are always bound to the component controller and not to the scope.
    • setController

      @JsProperty void setController(Object controller)
      Public Component.controller member exposed by the AngularTS namespace contract.
    • setControllerAs

      @JsProperty void setControllerAs(String controllerAs)
      An identifier name for a reference to the controller. If present, the controller will be published to its scope under the specified name. If not present, this will default to '$ctrl'.
    • setReplace

      @JsProperty void setReplace(boolean replace)
      Replaces the generated component host element with the component template.
    • setRequire

      @JsProperty void setRequire(jsinterop.base.JsPropertyMap<String> require)
      Requires the controllers of other directives and binds them to this component's controller. The object keys specify the property names under which the required controllers (object values) will be bound. Note that the required controllers will not be available during the instantiation of the controller, but they are guaranteed to be available just before the onInit method is executed!
    • setTemplate

      @JsProperty void setTemplate(Object template)
      html template as a string or a function that returns an html template as a string which should be used as the contents of this component. Empty string by default. If template is a function, then it is injected with the following locals: $element - Current element Use the array form to define dependencies.
    • setTemplateUrl

      @JsProperty void setTemplateUrl(Object templateUrl)
      Path or function that returns a path to an html template that should be used as the contents of this component. If templateUrl is a function, then it is injected with the following locals: $element - Current element Use the array form to define dependencies.
    • setTransclude

      @JsProperty void setTransclude(Object transclude)
      Whether transclusion is enabled. Disabled by default.
    • setView

      Programmatic real-DOM view factory. It runs during linking after controller bindings and `onInit`, and is mutually exclusive with template, templateUrl, and replace.