I'm trying to implement modal forms in my project.
In the link, If I click first button (Hello2), type something in input and then close modal. When I click first button again everything stays as is in the first time (because modal page not initialized). If I click on the second button (ngOnInit Sample) everything works as I expected.
But if you check app.component.html
in the second sample nearly most of the code is written in app.component.html
. I want to use like in the first sample (<hello2 #hello2Comp name="{{ name }}"></hello2>
) but expecting to work like second sample. Re init my form in every open/show form.