Is it possible to transfer data from a template to a component without the need for an event trigger like a button or form submission? For instance, in the code snippet provided, how can we pass the 'item' from the 'items' array to the component?
items.html
<div *ngFor="let item of items"></div>
items.component.ts
onInit(item) {
console.log(item);
}