-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor BasePageComponent to use input() for bglight property and up…
…date currentClass method; enhance HighlightDirective with improved mouse event handling
- Loading branch information
1 parent
b1da18e
commit 43a72c4
Showing
3 changed files
with
6 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component, input } from '@angular/core'; | ||
|
||
@Component({ | ||
template: '', | ||
imports: [CommonModule], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class BasePageComponent { | ||
@Input({ required: false }) bglight = false; | ||
readonly bglight = input(false); | ||
|
||
// HACK: This is a workaround for the issue with the `ngClass` directive | ||
currentClass = () => { | ||
return { | ||
'bg-light': this.bglight, | ||
'bg-light': this.bglight(), | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters