Issue with closing angular ui bootstrap modal

210 Views Asked by At

Hi I'm getting the below exception when I try to close the modal window.

TypeError: Cannot read property 'ng339' of undefined

I use angular 1.3 and ui-bootstrap 0.12.. I get this error when I use the highcharts-ng directive In modal I get this error. Not sure what is going wrong.

<div class="modal-large">
<div class="modal-header">
    <button class="close" type="button" data-ng-click="previewReport.closeModal()">&nbsp;</button>
    <h3 class="modal-title" data-ng-bind="previewReport.header"></h3>
</div>
<div class="modal-body">
  <div class="ctf-content">
      <div data-ng-if="previewReport.chartConfig !== undefined && previewReport.chartConfig !== null">
          <data-highchart config="previewReport.chartConfig"></data-highchart>
      </div>
  </div>
</div>

It just fails over here

function removeAfterAnimate(domEl, scope, emulateTime, done) {

on line

domEl.remove();

Error Stack..

at jqLiteRemoveData (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:2488:26)
at jqLiteDealoc (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:2457:7)
at forEach.remove (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:3097:5)
at Object.JQLite.(anonymous function) [as remove] (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:3182:17)
at afterAnimating (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:28874:17)
at http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:14487:28
at completeOutstandingRequest (http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:4504:10)
at http://ashik-lt7.maa.corp.collab.net:8080/ctf/js/all-in-one.js:4804:7 
1

There are 1 best solutions below

0
On

Closing this as I figured out the issue is because the previewReport is undefined and 'previewReport.chartConfig' and fails here.