Hi,
I am trying to attach a number to the node of the tree based on the condition. So i am using a template to do the condition checking
private counttemplate: string = "{{if ${c} != \"0\" && ${c} != \"\"}}${title}<span style=\"font-weight:bold;color:#556B2F\">${c}</span>{{else}}${title}{{/if}}'";
seems like the igtree doesnt like this. but if i take of the condition checking and just do ${title}<span style=\"font-weight:bold;color:#556B2F\">${c}</span>
it works.
Please let me know how to make the templating work with igtree with angular 2 framework.
I was able to make the changes to the data to make it work but the problem i have is applying multiple templates to a single children under a parent node.To explain better
my data yeild tree somewhat like
ROOT
INBOX
Item
REPORT
A Report
a
b
so i am trying to template the title of the report such that is there is a v attributes set to N the title would be bold on the children level.
what i am seeing is if i apply the template i have put in the a, b gets bold but even if i do have a v attribute for the inbox level children the title doesn't get applied the template i have put in which is
bindings: {
childDataProperty: "children", textKey: "title", valueKey: "id", imageUrlKey: "iconURL", expandedKey: "Expanded", nodeContentTemplate: "{{if ${c} != 0 && ${c} != \'\' && ${c} != null}} ${title}<span style=\"font-weight:bold;color:#556B2F\"> (${c})</span>{{else}}${title}{{/if}}", bindings: { childDataProperty: "children", textKey: "title", valueKey: "id", imageUrlKey: "iconURL", expandedKey: "Expanded", nodeContentTemplate: "{{if ${c} != 0 && ${c} != \'\' && ${c} != null}} ${title}<span style=\"font-weight:bold;color:#556B2F\"> (${c})</span>{{else}}${title}{{/if}}", bindings: { childDataProperty: "children", textKey: "title", valueKey: "id", imageUrlKey: "iconURL", expandedKey: "Expanded", nodeContentTemplate: "{{if ${v} == \'N\'}}<a style=\"font-weight:bold\">${title}</a>{{else}}${title}{{/if}}" } } }
How do i go about applying template on the children level for the inbox without compromising whatever templating i have done so far.
I have attached a sample attached with this message.
Hello,
Sounds like you have to include additional condition into the template of the second binding.