We often write about Vue and React, but not about Angular. So let’s pay a bit more of attention to this very popular open-source framework developed by Google. Recently, in the latest Syndicode digest we talked about ECMAScript Decorators. And today we will introduce another decorator worth your attention. Let’s explore @Attribute decorator in Angular!
To start with, putting simple, a decorator is a way of wrapping one piece of code with another — literally ‘decorating’ your code. You might have heard this concept of previously as functional composition or higher-order functions.
The @Attribute
decorator is one of the least known and least used, but in some cases, it can bring a performance boost to the application. It returns the value of the specified attribute from the host.
Check its use case and code examples here!