我有一个NG-重复打印出的图列表AngularJs - 在工具提示应用范围函数变量时奇怪的错误
<td ng-repeat="field in objectKeys(estimate)" ng-init="amount = estimate[key]">
<a href="#"
editable-text="estimate[field]"
onaftersave="updateFigure(field,value[field], estimate)"
tooltip="${{formatNumber(actualTable[account][field])}}"
tooltip-trigger="mouseenter"
tooltip-placement="left">
{{formatNumber(estimate[field])}}
</a>
</td>
的好处是,它完美的作品即打印估计用工具提示显示实际金额。
但是,由于变量actualTable[account][field]
为空,控制台不断报告错误,称此{{formatNumber(actualTable[account][field])}}
函数调用有问题。但它不为空,否则无法正确打印。
错误的截图是
我还必须补充一点,实际的表数据是通过异步HTTP调用单独要求评估表。
我该如何解决这个问题?
是否'actualTable'通过Ajax填充添加
undefined
检查? – Reza通过anm asycn http呼叫是 – nogias