ng-repeat causing "Error: 10 $digest() iterations reached. Aborting! when passing scope to leaflet directive

喜夏-厌秋 提交于 2019-11-30 09:54:05

问题


Edited: After some advices i came back to old version of how i wanted handle angular and leaflet, link to fiddler but still is not working,

Explanation: It was working with angular-leaflet-directive, but this directive has very bad performance on firefox, to compare leaflet.js self is very good so i thought i will try to make some small directive on my own, maybe somebody has some advices what is wrong and how to fix it?

Link to fiddler:

fiddler

I try to pass result from ng-repeat to leaflet directive, but when i do it, angular start "Error: 10 $digest() iterations reached. Aborting!, there is no problem when i pass just data to directive. I tried few things but without result. I cannot even see markers. If the problem is in directive?

 <body ng-app="directoryAppMap">
<div ng-controller="DirectoryMapListController">
    <input ng-model="search" placeholder="Name" />
    <table id="table">
        <thead>
            <tr>
                <th>Name</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="hf in FilteredGeojson = (data | filter:search)">
                <td>{{ hf.properties.name }}</td>
                <td>{{ hf.geometry.coordinates }}</td>
            </tr>
        </tbody>
    </table>
    <div leaflet-directive id="map" data="FilteredGeojson"></div>

来源:https://stackoverflow.com/questions/28464558/ng-repeat-causing-error-10-digest-iterations-reached-aborting-when-passin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!