We can also attach the styling rules to the template itself, no matter whether it's an inline template or a template served through the templateUrl parameter:
@Component({
selector: 'app',
template: `
<style> p { color : red; } </style>
<p>I am a red paragraph </p>
`
})
export class AppComponent {}