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

Interface Component

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

Source from the content-addressed store, hash-verified

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

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