MCPcopy Create free account
hub / github.com/angular/angular / Component

Interface Component

packages/core/src/metadata/directives.ts:544–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542 * @publicApi
543 */
544export interface Component extends Directive {
545 /**
546 * The change-detection strategy to use for this component.
547 *
548 * When a component is instantiated, Angular creates a change detector,
549 * which is responsible for propagating the component's bindings.
550 * The strategy is one of:
551 * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
552 * - `ChangeDetectionStrategy#Eager` sets the strategy to `CheckAlways`.
553 *
554 * NOTE: OnPush is enabled by default.
555 */
556 changeDetection?: ChangeDetectionStrategy;
557
558 /**
559 * Defines the set of injectable objects that are visible to its view DOM children.
560 * See [example](#injecting-a-class-with-a-view-provider).
561 *
562 */
563 viewProviders?: Provider[];
564
565 /**
566 * The relative path or absolute URL of a template file for an Angular component.
567 * If provided, do not supply an inline template using `template`.
568 *
569 */
570 templateUrl?: string;
571
572 /**
573 * An inline template for an Angular component. If provided,
574 * do not supply a template file using `templateUrl`.
575 *
576 */
577 template?: string;
578
579 /**
580 * One relative path or an absolute URL for file containing a CSS stylesheet to use
581 * in this component.
582 */
583 styleUrl?: string;
584
585 /**
586 * Relative paths or absolute URLs for files containing CSS stylesheets to use in this component.
587 */
588 styleUrls?: string[];
589
590 /**
591 * One or more inline CSS stylesheets to use
592 * in this component.
593 */
594 styles?: string | string[];
595
596 /**
597 * One or more animation `trigger()` calls, containing
598 * [`state()`](api/animations/state) and `transition()` definitions.
599 * See the [Animations guide](guide/animations) and animations API documentation.
600 *
601 * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23

Callers 15

ChildCompClass · 0.90
MockChildCompClass · 0.90
ParentCompClass · 0.90
MyIfCompClass · 0.90
ChildChildCompClass · 0.90
TestProvidersCompClass · 0.90
CompWithUrlTemplateClass · 0.90
SomeComponentClass · 0.90
SomeOtherComponentClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected