Interface Directive<TController>


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

    • create

      @JsOverlay static <TController> Directive<TController> create()
    • getBindToController

      @JsProperty Object getBindToController()
      Whether to bind scope to controller
    • getCompile

      @JsProperty DirectiveCompileFn getCompile()
      Compile function for the directive
    • getController

      @JsProperty Object getController()
      Controller constructor or injectable string name
    • getControllerAs

      @JsProperty String getControllerAs()
      Alias name for the controller in templates
    • getCount

      @JsProperty double getCount()
      Currently only used by view directive
    • getLink

      @JsProperty DirectiveLinkFn getLink()
      Link function(s) executed during linking
    • getName

      @JsProperty String getName()
      Optional name (usually inferred)
    • getPriority

      @JsProperty double getPriority()
      Priority of the directive
    • getRequire

      @JsProperty Object getRequire()
      Required controllers for the directive
    • getRestrict

      @JsProperty String getRestrict()
      Restrict option: 'A' and/or 'E'. Defaults to 'EA' if not defined
    • getScope

      @JsProperty Object getScope()
      Scope configuration (`true`, `false`, or object for isolate scope)
    • getTemplate

      @JsProperty Object getTemplate()
      Inline template
    • getTemplateNamespace

      @JsProperty String getTemplateNamespace()
      Template namespace (e.g., SVG, HTML)
    • getTemplateUrl

      @JsProperty Object getTemplateUrl()
      Template URL for loading from server
    • getTransclude

      @JsProperty Object getTransclude()
      Enables transclusion or configures named slots
    • getView

      @JsProperty DirectiveView<Object,Object> getView()
      Real-DOM view factory. It is mutually exclusive with template, templateUrl, and replace and composes with compile/link.
    • isReplace

      @JsProperty boolean isReplace()
      Replaces the element with the template if true
    • isTerminal

      @JsProperty boolean isTerminal()
      Stops further directive processing if true
    • setBindToController

      @JsProperty void setBindToController(Object bindToController)
      Whether to bind scope to controller
    • setCompile

      @JsProperty void setCompile(DirectiveCompileFn compile)
      Compile function for the directive
    • setController

      @JsProperty void setController(Object controller)
      Controller constructor or injectable string name
    • setControllerAs

      @JsProperty void setControllerAs(String controllerAs)
      Alias name for the controller in templates
    • setCount

      @JsProperty void setCount(double count)
      Currently only used by view directive
    • setLink

      @JsProperty void setLink(DirectiveLinkFn link)
      Link function(s) executed during linking
    • setName

      @JsProperty void setName(String name)
      Optional name (usually inferred)
    • setPriority

      @JsProperty void setPriority(double priority)
      Priority of the directive
    • setReplace

      @JsProperty void setReplace(boolean replace)
      Replaces the element with the template if true
    • setRequire

      @JsProperty void setRequire(Object require)
      Required controllers for the directive
    • setRestrict

      @JsProperty void setRestrict(String restrict)
      Restrict option: 'A' and/or 'E'. Defaults to 'EA' if not defined
    • setScope

      @JsProperty void setScope(Object scope)
      Scope configuration (`true`, `false`, or object for isolate scope)
    • setTemplate

      @JsProperty void setTemplate(Object template)
      Inline template
    • setTemplateNamespace

      @JsProperty void setTemplateNamespace(String templateNamespace)
      Template namespace (e.g., SVG, HTML)
    • setTemplateUrl

      @JsProperty void setTemplateUrl(Object templateUrl)
      Template URL for loading from server
    • setTerminal

      @JsProperty void setTerminal(boolean terminal)
      Stops further directive processing if true
    • setTransclude

      @JsProperty void setTransclude(Object transclude)
      Enables transclusion or configures named slots
    • setView

      @JsProperty void setView(DirectiveView<Object,Object> view)
      Real-DOM view factory. It is mutually exclusive with template, templateUrl, and replace and composes with compile/link.