I have created one custom directive for multi-select in angular js and I'm passing data to multi-select directive as below:
<multiselect select-items="selectedCodes" data="names"
check-id="id1"></multiselect>
and scope in my js file is
scope: {
data : '=',
selectItems : '=',
checkId : '@'
},
Everything is working fine as expected, but only when I am hard coding data and using that in my directive. However, when I am getting data from web service and using those variables in my directive, a null value is going instead of the web service data.
I think directive is loaded before my web service call returns data.
Can anyone suggest any solution to this?
Thanks in advance.