app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
divStyle ='color:teal; background-color:azure; padding:25px';
}
app.component.html
<h2>Angular Multiple Style Binding</h2>
<div [style]="divStyle">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phasellus sit amet dignissim justo, vitae maximus lectus.
Integer molestie a nunc id ullamcorper.
Etiam ornare est quis rhoncus maximus.
</div>
- angular - Loop through an array of objects
- angular - How to use nested loop
- angular - How to bind style
- angular - Text input on change listener
- angular - How to get text input value
- angular - How to create a counter
- angular - Generate random number in range
- angular - Generate random whole number
- angular - How to submit form data
- angular bootstrap - Dismissible alert
- angular bootstrap - Danger warning success alert
- angular bootstrap - Alert closed event
- angular bootstrap - Rating hover event
- angular bootstrap - Readonly & editable Rating
- angular bootstrap - How to show Toast message