ng-repeat causing \"Error: 10 $digest() iterations

2020-02-15 09:38发布

问题:

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>