Hello this is the first time I qm putting question on stackoverflow. I am developing an application in angular2: v2.1.0 (typescript- v2.0.10). I am using \"ng2-file-upload\
It's actually quite easy.
When ever you define an ngIf , you put an expression inside it right ?
That means every time there is an update inside that component , Angular needs to make sure that the expression inside the ngIf
is evaluated. ( This is what you expect from Angular right ? other wise why would you use ngIf
?)
So every time there is an update in the model , or rather , every time there is something that triggers the changeDetection, Angular evaluates that expression , which in your case is a function ( isUploaderEmpty ).
Generally , events are one of the things that fire a changeDetection( it's more complicated than this ).
So that's why :D.