TreeView using controlTemplate in Angular 4

Posted by: steponkus13 on 14 September 2017, 12:10 pm EST

  • Posted 14 September 2017, 12:10 pm EST

    Hello,

    I am trying to create a custom HTML5 template in Angular 4 using “controlTemplate” property. Could someone provide an example how to achieve this? The end goal is to be able to customize the treeView by utilizing this template.

    Thanks!

  • Posted 14 September 2017, 12:10 pm EST

    Hi,

    If you would like to customize treeView control, please use the formatItem for this. The controlTemplate requires further investigation. Hence, this issue has been escalated to the concerned team for further investigation with tracking id 275382. We will let you know as soon as we get any update on this issue.

    Thanks,

    Manish Kumar Gupta

  • Posted 20 January 2018, 7:29 am EST

    Hi,

    We are sorry for the late reply.

    controlTemplate is present in any Wijmo control. The way to customized it (for several controls) is shown up in the following sample:

    http://demos.wijmo.com/5/Angular2/Explorer/Explorer/#/infra/templates

    Note that the property doesn’t accept an Angular template, it can be a plain HTML only.

    The TreeView.controlTemplate is defined as follows:

    static controlTemplate = '<div wj-part="root"></div>'; // node container
    

    I.e. it’s a single div where the control adds all its content dynamically. So, you may not do so much with it, just add some surrounding HTML elements.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels