Angular Component Interaction - 5 - Getters and Setters

preview_player
Показать описание

📱 Follow Codevolution

In this series on Angular Component Interaction, we are going to take a look at some of the common scenarios in which components interact to share information.

Angular Component Interaction Getters and Setters
Рекомендации по теме
Комментарии
Автор

amazing man. concepts are being cleared !

learntocode
Автор

thanks alot for making it easy to understand

RABWA
Автор

Since angular detection triggers X times per second, if you use a getter (function) it will call it X times. Performance wise, is that a problem? VS using a public variable.

edgarsantos
Автор

what's the advantage of using getter and setter?

AGUNGKAYA
Автор

So if splitting the two way binding acts similar to getters and setters. Which one should one use?

Twitchyyyyyy
Автор

this way is confusing ? so its angular feature or typescript ?

sanjeevsinha-in
Автор

I don't think setter are suppost to have site effects, as they could be called from different places.
I would not recommand using a setter here.

comvnche