<?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: Qlik Sense template and paint in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849123#M2867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great insight Alexander! Ok, I got a better idea on how angular works in qlik sense extension, totally appreciate your inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2015 01:14:32 GMT</pubDate>
    <dc:creator>bryan_sng</dc:creator>
    <dc:date>2015-05-28T01:14:32Z</dc:date>
    <item>
      <title>Qlik Sense template and paint</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849119#M2863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to use angularjs in qlik sense extension but realise that without a template, angularjs cannot run.&lt;/P&gt;&lt;P&gt;So I include the template: templateContent but instead, my paint function does not run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have any idea? Below is an extract of the extension:&lt;/P&gt;&lt;P&gt;Do note that templateContent and the other variables in the extract are properly loaded in the define function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; type: 'visualization',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; definition: properties,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialProperties: initialproperties,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; snapshot: {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; canTakeSnapshot: true&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; template: templateContent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; paint: function($element, layout) {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert('a'); // this is never called but if I remove "template: templateContent", it will&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; };&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 07:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849119#M2863</guid>
      <dc:creator>bryan_sng</dc:creator>
      <dc:date>2015-05-26T07:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense template and paint</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849120#M2864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ye so if you have a template your 'rendering' should happen in the template.&lt;/P&gt;&lt;P&gt;If you decide to go the angular route then you probably also want a controller assigned to the template as you opted out of the paint function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The controller will be in charge of manipulating the data that is on scope which you then render in your template.&lt;BR /&gt;The documentation has a good example on it here &lt;A href="https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/CodeExamples/angular-chart-extension-example.htm%3FTocPath%3DQlik%2520Sense%2520Workbench%7CCode%2520examples%7C_____6" title="https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/CodeExamples/angular-chart-extension-example.htm%3FTocPath%3DQlik%2520Sense%2520Workbench%7CCode%2520examples%7C_____6"&gt;https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/CodeExamples/angular-chart-extension-example.htm%3FTocPath%3DQlik%2520Sense%2520Workbench%7CCode%2520examples%7C_____6&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extension layout will be on scope and accessible from your template by default so you can do something like&lt;BR /&gt;&lt;SPAN class="token tag" style="color: #990055; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 11.9999990463257px; background-color: #f9f9f9;"&gt;&lt;SPAN class="token punctuation" style="color: #999999;"&gt;&amp;lt;&lt;/SPAN&gt;div&lt;/SPAN&gt;&lt;SPAN style="color: #990055; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 11.9999990463257px; background-color: #f9f9f9;"&gt; &lt;/SPAN&gt;&lt;SPAN class="attr-name token" style="color: #669900; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 11.9999990463257px; background-color: #f9f9f9;"&gt;ng-repeat&lt;/SPAN&gt;&lt;SPAN class="attr-value token" style="color: #0077aa; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 11.9999990463257px; background-color: #f9f9f9;"&gt;&lt;SPAN class="token punctuation" style="color: #999999;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="color: #999999;"&gt;"&lt;/SPAN&gt;row in layout.qHyperCube.qDataPages[0].qMatrix&lt;SPAN class="token punctuation" style="color: #999999;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="color: #999999; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 11.9999990463257px; background-color: #f9f9f9;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that makes things a little bit clearer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 02:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849120#M2864</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2015-05-27T02:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense template and paint</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849121#M2865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ok, that's good information to know that paint function will not be utilised if going down the angular route. However if the paint function cannot be used, how can I get the extension to do something whenever the visualization is resized?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 05:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849121#M2865</guid>
      <dc:creator>bryan_sng</dc:creator>
      <dc:date>2015-05-27T05:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense template and paint</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849122#M2866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You define that in your controller by listening for re-size events depending on what you want do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think of it as the controller will replace your paint function. There are great angular resources on the web, I would recommend you read up on it if you decide to go the angular route instead of good ol' JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Alexander Karlsson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 11:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849122#M2866</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2015-05-27T11:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense template and paint</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849123#M2867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great insight Alexander! Ok, I got a better idea on how angular works in qlik sense extension, totally appreciate your inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 01:14:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-template-and-paint/m-p/849123#M2867</guid>
      <dc:creator>bryan_sng</dc:creator>
      <dc:date>2015-05-28T01:14:32Z</dc:date>
    </item>
  </channel>
</rss>

