Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

joel_orta
New Contributor

Help with simple Widget ToC with ng-repeat and Navigation API.

Hello, good afternoon to all.


Maybe someone can help me; I have a problem with the qw-sys-info component, I am trying to make a simple widget for a table of contents for Qlik Sense.

Here is my code:

<qw-sys-info content="sheets">

    <ul>

        <li class="mxTocLi" ng-repeat="sheet in sheets" ng-click="navigation.gotoSheet('{{sheet.qInfo.qId}}')">

            <br>

            <span class="mxTocSpn" ng-bind="sheet.qMeta.title"></span>

        </li>

    </ul>

</qw-sys-info>

And css style:

.mxTocLi {

    width: 146px;

    height: 80px !important;

    display: inline-block;

    margin: 5px 5px 10px 5px;

    padding: 4px 4px 4px 4px;

    border:1px solid gray;

    text-align:center;

    vertical-align: middle;

}

.mxTocSpn{

    display: inline-block;

    vertical-align: middle;

}

Problem is code in ng-click don't run o show any problem or error message. I did several tests and everything seems to point to a problem of scope; ng-click don't execute navigation.gotoSheet.

However, if I copy and paste the generated code without it being generated with ng-repeat everything works perfectly. It is very similar to what is described here:

Inserting Parameters into JS using Angular

Thanks in advance.

1 Solution

Accepted Solutions
joel_orta
New Contributor

Re: Help with simple Widget ToC with ng-repeat and Navigation API.

I found the answer


For all the new ones in Angular:



Is not the same:




ng-click = "navigation.gotoSheet ('{{sheet.qInfo.qId}}')"




What:


ng-click = "navigation.gotoSheet (sheet.qInfo.qId)"



Note: Message edited by Community Moderator to add English translation as a courtesy.


- - - - -

Encontré la respuesta.

Para todos los nuevos en Angular:

No es lo mismo:


ng-click="navigation.gotoSheet('{{sheet.qInfo.qId}}')"


Que:

ng-click="navigation.gotoSheet(sheet.qInfo.qId)"

1 Reply
joel_orta
New Contributor

Re: Help with simple Widget ToC with ng-repeat and Navigation API.

I found the answer


For all the new ones in Angular:



Is not the same:




ng-click = "navigation.gotoSheet ('{{sheet.qInfo.qId}}')"




What:


ng-click = "navigation.gotoSheet (sheet.qInfo.qId)"



Note: Message edited by Community Moderator to add English translation as a courtesy.


- - - - -

Encontré la respuesta.

Para todos los nuevos en Angular:

No es lo mismo:


ng-click="navigation.gotoSheet('{{sheet.qInfo.qId}}')"


Que:

ng-click="navigation.gotoSheet(sheet.qInfo.qId)"

Community Browser