Tm1-ui-subnm - run a function on change


How to run a function when value in tm1-ui-subnm changes?
i.e. I am looking for something like ng-change directive when it’s attached to select tag


Hi @aeremenko,

What is the function supposed to do?



Just any function attached to $scope in controller.


Hi @aeremenko,

There is no direct way at the moment to fire a function when the value changes. So at the moment, you can use Angular’s $watch function since you are going to write some JS codes already.

We are currently looking into this and will update this topic once we have finalized the changes.




Example of tm1-ui-subnm in HTML file:

            tm1-dimension="sales measure"

To run my function when value of tm1-ui-subnm (measure) changes I put the following code in the controller:



Hi @aeremenko,

Just to update this topic that we have added an attribute into the subnm directive to help out on this one and will be part of the next build release.

Details should be sent altogether on the release notes.