The background color of the div is not changing when using the style binding using Angular.The code is placed below for reference
@Component({
selector: 'course',
template: `
<div [style.backgroundColor]='red'>
<button (click)="onClick($event)" class="btn btn-primary" [class.active]="isActive" [style.backgroundColor]='red'>Save</button>
</div>
`,
styleUrls: ['./course.component.css']
})
export class CourseComponent {...}
The style element has the backgroundColor property. Where am I going wrong?