Home ngClass always showing the class regardless of boolean in Angular 5
 I can't get ngClass working in my Angular 5 app, the class is always showing regardless of if the boolean variable that I am using to show it conditionally is true or false. I have a component that shows rating stars:  export class RatingStarComponent { @Input() max: number; @Input() initial: number; @Input() readOnly: boolean; @Output() onRating = new EventEmitter(); maxItem: any[]; ratedCount: number; hideHover: boolean; constructor() {} ngOnInit() { this.ratedCount = this.initial; this.hideHover = this.readOnly; this.maxItem = []; for (var i = 0; i < this.max; i++) { this.maxItem.push(i + 1); } } toggleRating(s: number) { this.ratedCount = s; this.onRating.emit(this.ratedCount); } }  This is my html 
 If I add {{this.hideHover}} to this html then it is reflecting properly, showing true or false depending on how I call it. I call the component like so:   However my hideme class is always being added to the component. What am I doing wrong.