Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IComponentOptions

Component definition object (a simplified directive definition object)

Hierarchy

  • IComponentOptions

Index

Properties

Optional bindings

bindings: object

Define DOM attribute binding to component properties. Component properties are always bound to the component controller and not to the scope.

Type declaration

  • [binding: string]: string

Optional controller

controller: string | Function | string | Function | IComponentController

Controller constructor function that should be associated with newly created scope or the name of a registered controller if passed as a string. Empty function by default. Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)

Optional controllerAs

controllerAs: string

An identifier name for a reference to the controller. If present, the controller will be published to scope under the controllerAs name. If not present, this will default to be the same as the component name.

default

"$ctrl"

Optional require

require: object

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!

Type declaration

  • [controller: string]: string

Optional template

template: string | Function | string | Function

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 $attrs - Current attributes object for the element Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)

Optional templateUrl

templateUrl: string | Function | string | Function

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 $attrs - Current attributes object for the element Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)

Optional transclude

transclude: boolean | string | object

Whether transclusion is enabled. Enabled by default.

Generated using TypeDoc