I have Angular2/Typescript website. I am using PrimeNG frameowrk for CSS. In my site I have jQuery full calendar. What I want to achive is when event is clicked - modal appears.
In AfterViewInit interface method I have created fullClendar object as below:
  $("#calendar").fullCalendar({
   //..some properties
   eventClick: function (calEvent) {
                this.display = true;
    }
  })
display is field on this component class. When display is set to true modal should appear - setting it to true doesnt show modal.
However I have button in the same page which has onClick handler
public showDialog() {
        this.display = true;
    }
Clicking the button show the modal.
There is HTML
<div class="ui-g dashboard" style="margin-top: -18px">
  <div class="ui-g-12 ui-md-12">
    <div class="card">
      <div id="calendar"></div>
    </div>
  </div>
</div>
<p-dialog header="Godfather I" [(visible)]="display" modal="modal" width="300" responsive="true">
  <p>dadsasd</p>
  <p-footer>
    <div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
      <button type="button" pButton icon="fa-close" (click)="display=false" label="No"></button>
      <button type="button" pButton icon="fa-check" (click)="display=false" label="Yes"></button>
    </div>
  </p-footer>
</p-dialog>
<button type="text" (click)="showDialog()" pButton icon="fa-external-link-square" label="Show"></button>
What is the problem ?
 
    