3. Attribute Directives - ngStyle

3.A. Apply multiple CSS properties to a paragraph in a component using ngStyle. Add the following code to component.ts export class YourComponent { paragraphColor: string = 'red'; paragraphFontSize: string = '20px'; } In your component.html file, use the ngStyle directive to apply the styles: <p [ngStyle]="{ 'color': paragraphColor, 'font-size': paragraphFontSize }"> This paragraph will have dynamic styles applied using ngStyle. </p> Whenever the component's properties paragraphColor or paragraphFontSize change, the paragraph's style will be automatically updated accordingly. For instance, if you want to change the styles dynamically based on a button click, you can do it in the component's logic: export class YourComponent { paragraphColor: string = 'red'; paragraphFontSize: string = '20px'; changeStyles() { this.paragraphColor = 'blue'; this.paragraphFontSize ...