<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344639#M7705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;You probably need to publish some code snippet to explain your problem. There are lots of angular-based extensions where this works, so it must be some special case you have come across.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could of course use paint() and resize() even in an angular-based extension, but in most cases this should not be needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;P&gt;&lt;A href="http://extendingqlik.upper88.com/" title="http://extendingqlik.upper88.com/"&gt;Extending Qlik – Use Qlik in your own apps and sites&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Feb 2018 18:33:47 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2018-02-01T18:33:47Z</dc:date>
    <item>
      <title>How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344633#M7699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"&gt;When using plain JavaScipt, we write the rendering logic inside the 'paint' function and it gets executed and the view gets re-rendered, whenever we resize the element, or when the data changes on applying filters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"&gt;But when using AngularJS controller, re-rendering is not happening in both the cases. I've to refresh the browser to see the changes take effect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"&gt;Please help me with this.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344633#M7699</guid>
      <dc:creator />
      <dc:date>2017-06-09T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344634#M7700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Angular uses double-way binding, so there is no re-paint, AngularJS takes care of updating the corresponding DOM elements. Maybe this article helps as a starting point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qliksite.io/tutorials/qliksense-visualization-extensions/part-02/02-The-Angular-Way--Basics/" title="http://qliksite.io/tutorials/qliksense-visualization-extensions/part-02/02-The-Angular-Way--Basics/"&gt;The Angular Way: Basics | qliksite.io&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 18:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344634#M7700</guid>
      <dc:creator>Stefan_Walther</dc:creator>
      <dc:date>2017-06-09T18:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344635#M7701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Stefan, update is happening neither when resized (positioning of the elements inside, based on the new width and height after resize) nor when the data changes. I've to refresh the page to see the new data and positioning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 19:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344635#M7701</guid>
      <dc:creator />
      <dc:date>2017-06-09T19:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344636#M7702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same issue, I was able to find a workaround. Not sure if this is the best solution or not, but it worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I wanted was to detect when the following events are triggered:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Browser window has been resized&lt;/P&gt;&lt;P&gt;2. Extension element has been resized&lt;/P&gt;&lt;P&gt;3. Layout/properties of my extension has been modified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first might be achieved by subscribing to window resize event. With the jquery it is easy - just put it in your angular controller&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15014161833665489 jive_text_macro" jivemacro_uid="_15014161833665489" modifiedtitle="true"&gt;
&lt;P&gt;$(window).on("resize", function(event) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("window.resize");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.dir(event);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do whatever you want&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other two were a bit trickier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To sort the second issue I did the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a dummy invisible component in my extension definition, injected a $rootScope into the controller and then created an event watcher:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15014165139543196" jivemacro_uid="_15014165139543196"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15014165730869909 jive_text_macro" jivemacro_uid="_15014165730869909" modifiedtitle="true"&gt;
&lt;P&gt;refresh: {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; component: {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; template: "&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controller: ["$rootScope", "$scope", function ($rootScope, $scope) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $scope.$on("layoutchanged", function (event, data) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rootScope.$broadcast("myLayoutChanged", data);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the main component controller I added another watcher:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15014167200378511" jivemacro_uid="_15014167200378511" modifiedtitle="true"&gt;
&lt;P&gt;$scope.$on("myLayoutChanged", function (event, data) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("myLayoutChanged");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.dir(event);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.dir(data);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do wahterver you want&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to watch on the "layoutchanged" message directly on the main controller, but it did not work. Possibly that the message was not propagated to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution to the third issue was to inject a $rootScope into main controller, add to the layout object a function to return the $rootScope object and then use it in the onResize() (non angularjs) event to broadcast a message which can be then catched in the main controller:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15014170978359185 jive_text_macro" jivemacro_uid="_15014170978359185" modifiedtitle="true"&gt;
&lt;P&gt;resize: function($element, layout) &lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layout.getRootScope) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $rootScope = layout.getRootScope();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rootScope.$broadcast("myElementResize", $element);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;},&lt;/P&gt;
&lt;P&gt;template: ngTemplate,&lt;/P&gt;
&lt;P&gt;controller: ["$rootScope", "$scope", "$element", "$attrs", function ($rootScope, $scope, $element, $attrs) {&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $scope.layout.getRootScope = function() {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $rootScope;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $scope.$on("myElementResize", function (event, data) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("myElementResize");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.dir(event);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.dir(data);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do whatever you want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The rest of the controller code goes here&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}]&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2017 12:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344636#M7702</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2017-07-30T12:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344637#M7703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry you need to switch places my answers 2 and . Also for data change event you may try the similar approch to layout change, but use "datachanged" message instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2017 12:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344637#M7703</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2017-07-30T12:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344638#M7704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Darius,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having this issue when building AngularJS style extensions, I'm not really seeing the value in creating these style extensions when the DOM doesn't actually get updated with layout changes. &lt;A href="https://community.qlik.com/qlik-users/41639"&gt;swr&lt;/A&gt;‌ can you help explain why it is like this with AngularJS extensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't get your solution to work, have you found another way of updating the extensions DOM when the layout is changed at all? Do you know if this method is still working in November 2017?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 14:46:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344638#M7704</guid>
      <dc:creator>ygfletch</dc:creator>
      <dc:date>2018-02-01T14:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344639#M7705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;You probably need to publish some code snippet to explain your problem. There are lots of angular-based extensions where this works, so it must be some special case you have come across.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could of course use paint() and resize() even in an angular-based extension, but in most cases this should not be needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;P&gt;&lt;A href="http://extendingqlik.upper88.com/" title="http://extendingqlik.upper88.com/"&gt;Extending Qlik – Use Qlik in your own apps and sites&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 18:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344639#M7705</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-02-01T18:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344640#M7706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Erik. I've played around with it after what you've said as I thought I must have been missing something. I was saving the values from the layout directly onto $scope in the controller, then using these variables within an ng-class expression. I've changed the template to use the layout.variable version and this does update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers Erik &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 09:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344640#M7706</guid>
      <dc:creator>ygfletch</dc:creator>
      <dc:date>2018-02-02T09:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344641#M7707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Angular does take care of most variables by two-way binding but that works only with variables declared in the scope.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In a scenario where you are giving the user some filtering option by using some custom property on the side panel, those aren't updated by Angular, so you have to use the paint method to render those changes in the view. I prefer linking view to the controller with a variable and then when the side panel filter is applied, I used the paint function to just simply update my scope variable, Angular will take care of the rest! &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2018 15:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344641#M7707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-30T15:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344642#M7708</link>
      <description>&lt;P&gt;I know this is an old thread but I was looking for some help on it and thought that I would add my 2 cent solution for future readers.&lt;/P&gt;&lt;P&gt;TL;DR; use Angular Events to call your custom code when using a property on the $scope object.&lt;/P&gt;&lt;P&gt;So as far as I understand it, once the cube is returned, the ngTemplate and the $scope are 2 way bound, which means that when the $scope.layout.qHyperCube is updated by Qlik, the template will re-render. This only works when your template references the cube, which is updated and the binding then renders to the Template.&lt;/P&gt;&lt;P&gt;In my extension, I looped through the cube and massaged the data into the shape that I required and then added it as a property on the $scope object ($scope.myData = {...}), and my ngTemplate was bound to the myData property. In this scenario, the cube gets updated but my code doesn't get called to process the data into what I need.&lt;/P&gt;&lt;P&gt;To fix this, I re-run my code whenever the extension's data is Validated by using an Angular Event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;return {
    initialProperties: initialProps,
    definition: props,
    template: ngTemplate,
    controller: ['$scope', '$element', function ($scope, $element) {

        function processData() {
        var data = {};
        // Do Stuff...
        $scope.myData = data;
        }

        // Enable scrolling
        $element.css("overflow-y", "auto");

        processData();

        /**
         * Validated event.
         * @description The data has been recalculated and new valid data is available.
         */
        $scope.component.model.Validated.bind(function () {
            processData();
        });
    }]
};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if this is the correct way to do it but it seems to be working.&lt;/P&gt;&lt;P&gt;(note: Using Qlik Sense Sept 2018)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 13:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344642#M7708</guid>
      <dc:creator>organgrindingmo</dc:creator>
      <dc:date>2018-12-13T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data changes?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344643#M7709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes that's a way to do it: the Validated event is actually not an angular event, but one that Qlik Sense defines. You probably also could use the paint method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 13:53:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1344643#M7709</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-10-02T13:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Qlik Sense extensions built with AngularJS re-render on resize or when the data chan</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1570646#M10359</link>
      <description>&lt;P&gt;A bit late maybe, but we have not the same problem. I want to know when grid cell size has been changed so we could recalculate some stuff ( scrollbars / virtual scroll). At this point we use Angular 2+ to create extensions so the Angular1 scope is not very usefull.&lt;BR /&gt;&lt;BR /&gt;In short ( this is Typescript nothing special for JS just remove Types )&amp;nbsp;to get notified something has been changed, just use the MutationObserver to get notified some styles changes&amp;nbsp; ( or other dom properties ).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;// get parent cell which describes width and height of the cell
const cell: HTMLElement = $element.closest('.cell').get(0);
const obs = new MutationObserver((mutations) =&amp;gt; {
    // at this point we get notified if grid cell style has been changed
    // this could be width, height, left or top 
    // this only happens if we  modify the grid cell into editor
    console.log(mutations);
});

/** tell the mutation observer to watch the cell for style changes */
obs.observe(cell, {
    attributes: true,
    attributeFilter: ["style"]
});

/** @todo disconnect on destroy to avoid memory leaks */&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 16:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-make-Qlik-Sense-extensions-built-with-AngularJS-re-render/m-p/1570646#M10359</guid>
      <dc:creator>rhannuschka</dc:creator>
      <dc:date>2019-04-17T16:12:43Z</dc:date>
    </item>
  </channel>
</rss>

