April 1, 2024, 8:28 a.m. | Connie Leung

DEV Community dev.to




Introduction


HostAttributeToken is a new feature in Angular 17.3.0 that injects static attributes of the host node. The decorator version of HostAttributeToken is @Attribute, and it is recommended to use it over @Input because Input triggers change detection even when the input value is static.


Before Angular 17.3.0,



<app-comp  hello='A' />

@Component({
selector: 'app-comp,
template: `<div>{{hello}}</div>`
})
export class SomeComponent {
hello: string;

constructor(@Attribute('hello) hello: string) {
this.hello = hello; // A
}
}


HostAttributeToken is an injection token that …

angular app attributes change detection feature hello host injection input introduction node token tutorial value version webdev

Social Engineer For Reverse Engineering Exploit Study

@ Independent study | Remote

Security Engineer II- Full stack Java with React

@ JPMorgan Chase & Co. | Hyderabad, Telangana, India

Cybersecurity SecOps

@ GFT Technologies | Mexico City, MX, 11850

Senior Information Security Advisor

@ Sun Life | Sun Life Toronto One York

Contract Special Security Officer (CSSO) - Top Secret Clearance

@ SpaceX | Hawthorne, CA

Early Career Cyber Security Operations Center (SOC) Analyst

@ State Street | Quincy, Massachusetts