title: Modal Component BsModalRef is not bind on ngOnInit in angular
body: <p>Not able to bind data in model popup component using bsModalRef</p>
  
  <p><strong>Is there anyway to workaround for this issue to handle data in model popup?</strong></p>
  
  <pre><code>itemSummaryResult=[];
  
  showItemSummaryModal(id: number) 
  { 
  
   this.serverResultsService.getItemDetails(id).subscribe(
    data =&gt; {
      this.itemSummaryResult['ItemList'] = data['data'];
    },
    err =&gt; { console.log(err); }
  
  );
   this.bsModalRef = this.modalService.show(ItemDetailComponent, { class: 'modal-lg' });
   this.bsModalRef.content.data = this.itemSummaryResult;
  }
  </code></pre>
  
  <p>Model Component is as follows</p>
  
  <pre><code>itemList=[];
  
  constructor(
  public bsModalRef: BsModalRef)
  
  ngOnInit() { 
  setTimeout(() =&gt; {     
    this.itemList= this.bsModalRef.content.data['ItemList'];        
    }, 1000); 
  }
  </code></pre>
  
  <p>Getting data is undefined while trying to assign/get the data from model component</p>
  
  <p>console.log("ItemList",this.bsModalRef.content.data['ItemList'])</p>