Special UTF8 characters in IonicToast closeButtonText [SOLVED]


#1

[Just to save someone’s precious hour of life.]

I’m finishing the translation of an application, trying to avoid the wording where possible. My intent was to put UTF character inside the IonicToast closeButtonText. Being good a programmer I found the proper HTML code (⛌) and tried to put it somehow into the toast {options}. Nope the resulted button stated ⛌ same result with backslashes.
After a hour here and SO I realized that the Typescript accepts the hard-copied cross sign directly from the dingbats page. So my option object now looks like this and everything works. Weird but true.

let option: ToastOptions = {
      position: 'top',
      message: text,
      duration: tmeOut,
      closeButtonText: '⛌',
      dismissOnPageChange: true,
      showCloseButton: (!tmeOut) ? true : false
    };

I know other people here was struggling with special characters too. Hope it would help someone.