MCPcopy
hub / github.com/angular/angular / Component

Interface Component

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

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…