Package org.angular.ts.ng
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 TypeMethodDescriptionstatic <TControllerInstance,TScopeInstance, TElement>
Component<TControllerInstance, TScopeInstance, TElement> create()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.getView()Programmatic real-DOM view factory.booleanReplaces the generated component host element with the component template.voidsetBindings(jsinterop.base.JsPropertyMap<String> bindings) Define DOM attribute binding to component properties.voidsetController(Object controller) Public Component.controller member exposed by the AngularTS namespace contract.voidsetControllerAs(String controllerAs) An identifier name for a reference to the controller.voidsetReplace(boolean replace) Replaces the generated component host element with the component template.voidsetRequire(jsinterop.base.JsPropertyMap<String> require) Requires the controllers of other directives and binds them to this component's controller.voidsetTemplate(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.voidsetTemplateUrl(Object templateUrl) Path or function that returns a path to an html template that should be used as the contents of this component.voidsetTransclude(Object transclude) Whether transclusion is enabled.voidsetView(ComponentView view) Programmatic real-DOM view factory.
-
Method Details
-
create
@JsOverlay static <TControllerInstance,TScopeInstance, Component<TControllerInstance,TElement> TScopeInstance, create()TElement> -
getBindings
Define DOM attribute binding to component properties. Component properties are always bound to the component controller and not to the scope. -
getController
Public Component.controller member exposed by the AngularTS namespace contract. -
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
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
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
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
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
Define DOM attribute binding to component properties. Component properties are always bound to the component controller and not to the scope. -
setController
Public Component.controller member exposed by the AngularTS namespace contract. -
setControllerAs
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
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
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
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
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.
-