I have implemented ControlValueAccessor in my own primitive component. Its code you see: there (plunker)
In parent component, I use my with ng-if directive. I can hide and show my component through checkbox. Component inits and destroys each times but writeValue function call a lot of times. Please check my code at plunker
Why is this happening? How I can fix this issue?