Tm1-ui-rpt-title not Watched


#1

Hi guys,

I found an awkward behaviour in the tm1-ui-rpt-title directive.
The tm1-element directive is supposed to be WATCHED. In my setup when i change the value of the variable, the Active Form does not refresh.
Here is my code:
It’s an Active Form with some buttons at the top to control the scale.

       .........
       <div class="btn-group col-md-4" role="group">
                    <button type="button" class="btn btn-default" ng-click="page.scale = 'BASE'"  ng-class="{ 'active': page.scale == 'BASE'}" >Base</button>
                    <button type="button" class="btn btn-default" ng-click="page.scale = 'BASE_div_1e3'"  ng-class="{ 'active': page.scale == 'BASE_div_1e3'}" >Thousands</button>
                    <button type="button" class="btn btn-default" ng-click="page.scale = 'BASE_div_1e6'"  ng-class="{ 'active': page.scale == 'BASE_div_1e6'}" >Millions</button>
                    <button type="button" class="btn btn-default" ng-click="page.scale = 'BASE_div_1e9'"  ng-class="{ 'active': page.scale == 'BASE_div_1e9'}" >Billions</button>
       </div>
       .......
       <tm1-ui-rpt-title
                tm1-dimension="Scale"
                tm1-element="{{page.scale}}">
       </tm1-ui-rpt-title>
       .......

Any idea what I am doing wrong? Is this maybe a bug?

Cheers,

Marius


#2

Hi @mwirtz,

Try to check if the page.scale value is changing by just putting it out somehwere on your page.

Check out the active form in the samples application too for reference.


Paul


#3

Hi Paul,

thanks!
page.scale definetely changes. When I do a $tm1Ui.dataRefresh manually the activeForm refreshes with all the data.

The code is actually a copy of the ActiveForm sample. It works perfectly, just that the property doesnt seem to be watched.

Any ideas?

Marius


#4

Hi @mwirtz,

Try to do the active form via the Page Creator in your Canvas’ Admin page.

Then compare the HTML from there.


Paul


#5

Hi Paul,

thanks for the tip! I did as you said and started from scratch with with Page Creator. Now it works.

Cheers,

Marius