Hello I have a kind of confirmation modal with Inputs :

```
 @Input('input1') input1: string;
 @Input('input2') input2: boolean;

 constructor(private changeDetectorRef: ChangeDetectorRef) {
 }

 ngOnInit() {
 }

 public openModal(): void {
     console.log(this.input2)
     console.log(this.input1)
     this.confirmationModal.nativeElement.classList.add('open-modal');
 }

```

The parent Component when I'm opening this modal inside a subscribe method. In this method I'm assigning the values like this: 

```
@ViewChild('confirmationModal') confirmationModal;
input1: string;
input2: boolean;
ngOnInit(): void {    
}

ngOnDestroy(): void {
}

close(project: any) {  
 this.service.close(project).subscribe((success: ModelDto) => {
            this.confirmationModal.openModal();
            this.input2 = success.input2;
            console.log(this.input2)
            this.input1 = 'Some text';
        });
    }

```

In html I have :

```
<app-confirmation-modal #confirmationModal
                        [input1]="input1"
                        (sendConfirm)="toggleSettled($event)"
                        (generateReport)="generateReport()"
                        [input2]="input2">
</app-confirmation-modal>

```

Here is a method openModal from my confirmationModal: 

The two presented `console.logs` give undefined only on first opening of the modal.
So when I first try to open the modal I got an empty modal and input1 and input2 are undefined. But From this point every time I open a modal I got values that should be there both in modal and in `console.logs`. So the problem is only with the first opening and I have no clue what can cause it.

Edit:
I've tested it for more time and it appears that it's like 1 click delayed. I mean the values presented in Modal are from a cycle before than values that should be in actual click