我在尝试关闭模态窗口时遇到以下异常。
TypeError: Cannot read property 'ng339' of undefined
我使用angular 1.3和ui-bootstrap 0.12 .. 当我使用highcharts-ng指令时,我收到此错误在模态中,我收到此错误。不确定出了什么问题。
<div class="modal-large">
<div class="modal-header">
<button class="close" type="button" data-ng-click="previewReport.closeModal()"> </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>
它只是在这里失败了
function removeAfterAnimate(domEl, scope, emulateTime, done) {
在线
domEl.remove();
错误堆栈..
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
答案 0 :(得分:0)
关闭这一点,因为我发现问题是因为previewReport未定义,'previewReport.chartConfig'在这里失败。