I\'m using Angular 10, on click the following function is executed to preform direction change:
private changeHtmlDirection(direction: \'rtl\' | \'ltr\') {