What I'd like to do is run a function that returns a result and then use that result as the src for an image when the page loads. I'm running into issues having it work though
So my code is:
<img id="adult_total" src="/assets/media/images/AsExpected.png">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">
$(document).ready(function(){
var imgsource = $('#ProgramSummaryController').scope().getOutcomeRatingImage(getOutcomeDataForKey('GraftTotal'));
$('#adult_total').attr("src", imgsource);
});
</script>
where ProgramSummaryController is the ng-controller of the surrounding div. I don't see any errors in console so I'm not sure what I'm doing wrong
Thanks