What is the @ in @ component?

import {component} from "@angular/core";
@component({})

syntactically, component should be a function, so what effect does the previous @ have on this function? I"d like to explain it from the perspective of js or ts syntax. Don"t say it"s an annotation or decorator, don"t give such a vague explanation.

Jul.11,2021

is just the decorator syntax , nothing special, there is no need to delve into the fact that this grammatical style is also accepted by ES7, so in a sense both TypeScript and JavaScript express the same thing.

in fact, the concept of annotations comes from AtScript brought by the Traceur transcoder. The decorator is from TypeScript. However, although there are some differences between the two after the compiled results, there is no difference in the actual use of the vast majority of them.

just syntax
just syntax
just syntax

Don't wrestle with syntax
Don't wrestle with syntax
Don't wrestle with syntax

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35fc3-2bfbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35fc3-2bfbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?