Enable ng-click on a popup (mapbox)
<p>First I would like to apologize for my poor english</p>

<p>I'm working on a map with marker and popup all declared with mapboxgl, i'm trying to put a ng-click into a button of a popup instantiated in my controller</p>

<pre><code>   myMap.on('touchstart', function (e) {
        var features = myMap.queryRenderedFeatures(e.point, { layers: ['points'] });
            if (!features.length) {
                return;
            }
            console.log(features);
            var feature = features[0];

        if(popup == undefined){

            var html = '&lt;div class="popup-info"&gt;';
            html += "&lt;h5&gt;"+ feature.properties.type + "&lt;/h5&gt;";
            html += "&lt;p&gt;"+ feature.properties.description +"&lt;/p&gt;";
            html += '&lt;button ng-click="goToComment()"&gt;Commentaires (' + nbComment +') &lt;/button&gt;';
            html += "&lt;/div&gt;";
            html += '&lt;a href="#" class="btn-like"&gt;&lt;div style="width: 100%"&gt;';
            html += '&lt;div class="popup-like-img"&gt;&lt;img class="icon icons8-Thumb-Up" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACeUlEQVRoQ+1Z7XHVMBDcrQBSAaQCSAVAB1ABUAGkAkIFhAogFQAVkFRAqIBQAelgmWVk5sW2bNk+TZ5mcjP+86wn3d6t7stEsEi6D+ALgKcAPgM4JnkdfMz/7Ri9saS3AD7s7HtJ8ij6nG6/GgDOATzpKfyapL0RLjUAaETLC5KmVLiEApD0PPF/oCjJ0LOqUEiSafJyzMx7DyBFnz8Zjvwm+TCcPwDC3CrpBMC7jJLfSJpe4RICIFn/FwDngDFxLjgN1z7KAzPWt95HJC/3EkCB9avx3wbZTCFJpsabCet+JOnsXEU2AZD0GMCPGc2ekXR2riJbAVh5g5iSg70s5gou7j9QtRJYZ7FVHpgqGUZcUS0CrbrEifffJ2J+H4P5/6JPo7TPg0RB09CZepeO7iH8XweB7B1a5IEUMs37NWVBp4SVzCW83F2yAb6OvVwKwJ1WlZJgJhBkQ3ExAEmu502d25D3JF1rDWQJANc6a6gTAfiQ5NVqAJI+AXgVocnKPbLJcNIDktzbugy4Dd73sZ6SPO7/mAUgaay3XWnAsL8NLnNrAK5JHuyaozUAg9KkNQBnJG8Ek5YAnDmg9EuSVgBkhwKtAPC9Hc3GLQEwiEFCaw3AwAutARjMl1oCcOGSptUolJ3steCBK5KHuWqqBQDWPfuFpxUA2S88sx1Zmh64E3NP4OdeWHFcvtH2nrg7S5KLKT/9D3nl6ixbOVoDdVvMeiB3liR7xd2am/1Hy3QqWv0TwElunLIZwK4KaV7keY/BGFj3eHBVKo7zbtw9PzrPNfHFLWXpqaXr0l26MdCKmFqvplCp4rXX3QGobeG5/e88MGeh2u//AqzK4zHLKbkNAAAAAElFTkSuQmCC" width="30" height="30"&gt;&lt;/div&gt;';
            html += '&lt;div class="popup-like-nb"&gt;&lt;p class ="popup-like-nb-text"&gt; 13 &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;';
            /*linkFunction = $compile(angular.element(html));
            newScope = $scope.$new();
            console.log(linkFunction(newScope));
            linkFunction(newScope)*/

            popup = new mapboxgl.Popup({})
                .setLngLat(feature.geometry.coordinates)
                .setHTML(html)
                .addTo(myMap);
            }
            else {
                popup.remove();
                popup = undefined;
            }
    });
</code></pre>

<p>The problem is that my app seems to not being able to do the ng-click, i was looking for $compile (comment part right after the html declaration) cause I think there is a problem with instantiated HTML in controller, if someone got any idea of how to allow my ng-click to work in that instantiated popup.</p>

<p>Thx verymuch !</p>