Member-only story
Angular Functions Could Start With 🔑 Emoji. Here’s Why They Don’t
Do you know that there was a chance for some Angular apps to start with key character? 🔑. Learn why we don’t have it in function names.
With Angular 19 release I got back to review Angular merge requests.
By the way, if your team looks for a senior Angular Frontend developer please let me know. I’m looking for opportunities.
When browsing Kristiyan Kostadinov’s merge request for Hot Module Reload improvement, I’ve noticed something quite interesting:
'ɵɵreplaceMetadata(Cmp, m.default,
[i0], [token, { one: 0, two: "2",
three: 3 }, Component]));',
      );
My smartphone messed the code when pasting it here. But a curious eye will notice something weird here. Namely ɵɵreplaceMetadata.
What is it? It looks like a bug at first sight or some obfuscation. But in reality it’s a very important part of Angular.
What brings us closer to explaining the mistery of the key 🔑.
The character ɵ is a special character. It’s not a bug. It’s intentionally used by Angular developers. Some people say it’s Greek letter theta, but if we look at theta, it’s not the same: θ.