Within my JS file, I have some HTML text that is being returned to an HTML page. This HTML text contains a circle SVG element, which displays properly when retrieved from the API. When clicking on the circle, I want to call a JavaScript function in the same JS file. I attempted using ng-click but it is not functioning as expected.
htmlText += '<circle ng-click="getUrl()" cx="9.5" cy="9.5" stroke-width="2" stroke="'+statsObj[s].color+'" fill-opacity="0" r="8.00" title="" style="opacity: 1;" data-original-title="'+statsObj[s].state+'" ng-click="getUrl()"></circle>';
Is there a syntax error or is there another method we can use to achieve this functionality? Thank you in advance.