angular/aio/content/examples/view-encapsulation/src/app/app.component.ts
dario-piotrowicz 835987b78b refactor(docs-infra): use eslint in aio's example-lint script (#43218)
Instead of the deprecated tslint use eslint in the aio's example-lint
script

PR Close #43218
2021-12-15 12:28:46 -05:00

20 lines
733 B
TypeScript

import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<app-no-encapsulation></app-no-encapsulation>
<app-emulated-encapsulation></app-emulated-encapsulation>
<app-shadow-dom-encapsulation></app-shadow-dom-encapsulation>
`,
styles: [
`app-no-encapsulation, app-emulated-encapsulation, app-shadow-dom-encapsulation {
display: block; max-width: 500px; padding: 5px; margin: 5px 0;
}`,
'app-no-encapsulation { border: solid 2px red; }',
'app-emulated-encapsulation { border: solid 2px green; }',
'app-shadow-dom-encapsulation { border: solid 2px blue; }',
],
encapsulation: ViewEncapsulation.None,
})
export class AppComponent { }