I have a $tm1Ui.cellGet to get certain cell value in TM1.
When i replaced an element name with an ng-model name, the code stops working.
Does it mean $tm1Ui.cellGet doesn’t support variable?
This is how i used it:
in html: ng-model="example";
in js: $tm1Ui.cellGet('instanceName', 'cubeName', 'Ele1', 'Ele2', $scope.example);
My assumption would be that the initialization of $scope.example in the HTML doesn’t work as expected.
Did you check if $scope.example actually has a value through {{example}} in the HTML ?
There are ways, but how you initialize that variable may already give you that. Where are are you using this? In a directive? Can you post the HTML code on how you initialize this on your HTML page?
One way is to just update the setModule(data) function, and add a call to your cellGet. That way, you will be assured that it gets called when the value is available.
If you want it to be called once time only, you can create a flag, or a counter so that it only gets once.