src/app/text-display/text-display.component.ts
The text display component shows text in a labeled box, and if desired, allows the user to edit and save the text
selector | app-text-display |
styleUrls | ./text-display.component.scss |
templateUrl | ./text-display.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
labelText | |
Type : string
|
|
The title text. |
onEditFinished | |
Type : TextDisplayEditCallbackFn
|
|
A callback function. |
placeholder | |
Type : string
|
|
Default value : ''
|
|
The placeholder will be shown if the content is empty |
readonly | |
Type : boolean
|
|
If true, the edit button is not shown |
text | |
Type : string
|
|
Sets the content of the text display, and shows the placeholder if the text is empty |
finishEditing | ||||||
finishEditing(saved: boolean)
|
||||||
Parameters :
Returns :
void
|
startEditing |
startEditing()
|
Returns :
void
|
editMode |
Default value : false
|
editText |
Type : string
|
Default value : ''
|
showPlaceholder |
Default value : false
|
Private value |
Type : string
|
text | ||||||
gettext()
|
||||||
settext(value: string)
|
||||||
Sets the content of the text display, and shows the placeholder if the text is empty
Parameters :
Returns :
void
|
./text-display.component.scss