4 Replies Latest reply: May 28, 2018 8:52 PM by Frank Packer RSS

    MashUp AngularJS get objects

    Paolo Deregibus

      Hello community,


      I am working on a mashup project which uses angularJS to manage the application and the navigation, and embed some qlik sense objects in the pages.

      I am new to angular so I think I am probably miss something about the interaction it has with QS APIs.


      So far everything seems to work except the navigation between the pages: the first time a page is shown it works correctly. On the other hand if the users goes back to an already visited page, the custom HTML components (inlcuding components that retreive data via QS APIs) are loaded correctly, while the embedded QS objects do not appear in their containers. QS objects appear again if the user refreshes the page.


      To navigate from a page to an other I am using an ng-view that calls different template based on the route, all views share the same controller.

      Below the code.




      <div ng-view cache-view="false"></div>



      myApp.config( function ( $routeProvider ) {

              $routeProvider.when( '/competitorsAnalysis', {

                  templateUrl: 'templates/pages/competitorsAnalysis.html'

              } )

              .when( '/yearOnYear', {

                  templateUrl: 'templates/pages/yearOnYear.html'

              } )

              .otherwise( {

                      templateUrl: 'templates/pages/competitorsAnalysis.html'

                  } );

          } );


      Any help would be very appriciated.

      Thanks in advance!