Component inline styles
This is the documentation for Angular 6.
You can switch to the latest version Angular 10.
You can switch to the latest version Angular 10.
You can add a styles
array property to the @Component
decorator.
Each string in the array defines some CSS for this component.
@Component({
selector: 'app-demo',
template: `
<p>Demo component</p>
`,
styles: ['p { font-weight: bold; }']
})
export class DemoComponent {
/* . . . */
}