I’ve got the following loop which works fine, however the index.file_upload.url is rendering strange.
The Loop is:
angular.forEach($scope.post.acf.downloads, function (index, element) {
$scope.html += "<li> <a class='download-file-text' onclick='window.open('" + index.file_upload.url + "','_blank','location=yes,toolbar=yes,toolbarposition=top');'>" + index.file_upload.title + " <span>(" + $scope.filetype + ") </span></a></li>";
});
However it renders like:
<li>
<a class="download-file-text" onclick="window.open(" http:="" redactedurl="" connect="" wp-content="" uploads="" 2017="" 08="" acs-note-17.08.17ss.pdf','_blank','location="yes,toolbar=yes,toolbarposition=top');'">ACS note 17.08.17ss <span>(PDF) </span></a>
</li>