Member-only story

Angular Functions Could Start With 🔑 Emoji. Here’s Why They Don’t

Tom Smykowski
2 min read5 days ago

--

Photo by Kristina Paukshtite: https://www.pexels.com/photo/person-holding-silver-colored-skeleton-key-1591158/

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: θ.

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

Software Engineer & Tech Editor. Top 2% on StackOverflow, 3mil views on Quora. Won Shattered Pixel Dungeon.

No responses yet