I am currently working on formatting a piece of text to ensure it is displayed correctly for the user. The particular phrase I need to format, which is stored as a variable, is currently enclosed in single quotes, making it visually unappealing. To improve this, I plan to wrap the phrase with either a <strong>
tag or an <h4>
tag before passing it to another component for display.
Example of Code in Typescript:
this.persistingData.changeConfirmationDescription(`Are you sure you want to add the school '${this.schoolName}'?`);
Example of Code in HTML:
<h2>Confirm Action:</h2>
{{confirmationDescription}}
<button> Cancel </button> <button> Confirm </button>