- Use the replace property
Let's recreate our success and error messages. Create two directives called successMessage
and errorMessage
in the SuccessMessage.js
and ErrorMessage.js
files. The directives should render <div>Woohoo! Success!</div>
and <div>Oh no, an error occurred!</div>
respectively.
Make them both utilize the replace option!