-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4317a53
commit 42601c0
Showing
8 changed files
with
149 additions
and
164 deletions.
There are no files selected for viewing
15 changes: 12 additions & 3 deletions
15
src/app/components/shared/datetime/abstract-datetime.component.ts
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,16 +1,25 @@ | ||
export abstract class AbstractDatetimeComponent { | ||
import { OnChanges, Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "baw-abstract-datetime", | ||
templateUrl: "./abstract-datetime.component.html", | ||
}) | ||
export abstract class AbstractDatetimeComponent implements OnChanges { | ||
public constructor() {} | ||
|
||
public formattedValue: string; | ||
public tooltipValue: string; | ||
public rawDateTime: string; | ||
// I have implemented this method so that each datetime component will default to having no suffix | ||
public suffix = ""; | ||
|
||
/** | ||
* A method that should update formattedValue, tooltipValue, and rawDateTime | ||
* after during each change detection cycle the component updated as part of | ||
*/ | ||
public abstract update(): void; | ||
|
||
// I have implemented this method so that each datetime component will default to having no suffix | ||
public suffix = ""; | ||
public ngOnChanges(): void { | ||
this.update(); | ||
} | ||
} |
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
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
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
Oops, something went wrong.