angular/integration/ng_elements/src/elements.ts
Joey Perrott 894c1c5f10 refactor: apply prettier formatting to integration (#54653)
Apply prettier formatting to integration directories

PR Close #54653
2024-04-02 20:42:04 +00:00

41 lines
953 B
TypeScript

import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';
@Component({
selector: 'hello-world-el',
template: 'Hello {{name}}!',
})
export class HelloWorldComponent {
@Input() name: string = 'World';
}
@Component({
selector: 'hello-world-onpush-el',
template: 'Hello {{name}}!',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HelloWorldOnpushComponent {
@Input() name: string = 'World';
}
@Component({
selector: 'hello-world-shadow-el',
template: 'Hello {{name}}!',
encapsulation: ViewEncapsulation.ShadowDom,
})
export class HelloWorldShadowComponent {
@Input() name: string = 'World';
}
@Component({
selector: 'test-card',
template: `
<header>
<slot name="card-header"></slot>
</header>
<slot></slot>
<footer>
<slot name="card-footer"></slot>
</footer>`,
encapsulation: ViewEncapsulation.ShadowDom,
})
export class TestCardComponent {}