How to wait for asynchronous data before updating ui-options
问题 I'm trying to create a graph with ui-options like this: <div ui-jq="plot" ui-options=" [ { label: 'Strongly Agree', data: {{stronglyAgree}} }, { label: 'Agree', data: {{agree}} }, { label: 'Disagree', data: {{disagree}} }, { label: 'Strongly Disagree', data: {{stronglyDisagree}} }, { label: 'N/A', data: {{na}} } ] " style="height:240px"></div> But the data in double-curly brackets hasn't arrived yet, so it reads as empty and throws errors. This is inside a directive: function latestSurvey(){