@atkins.chrisw said in json/ ng-init passing data to directive.:
Thanks Jared. That worked. But the problem now is that the values are incorrect. And on one of them, it shows it as disabled.
If I use a standard drop down box with the device name as the input. I get the right values. Im trying to not have to hand enter each list selector.
I'm really not following what worked and what didn't.
Is it not possible to make the json object go directly into the ma-point-query.
It definitely is.
so instead of : <ma-point-query query="{deviceName:deviceName}" sort="'name'" points="powerPoints"></ma-point-query>
its more like : <ma-point-query query="{deviceName:{powerDevice}}" sort="'name'" points="powerPoints"></ma-point-query>
The first syntax is correct. Assuming you have a variable named deviceName on your scope. The second syntax is entirely incorrect. Do you want this maybe?
<ma-point-query query="{deviceName:powerDevice}" sort="'name'" points="powerPoints"></ma-point-query>