angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

Internet Explorer

Open adamkleingit opened this issue 10 years ago • 4 comments

Test on IE

adamkleingit avatar Jun 17 '16 11:06 adamkleingit

Hello Adam, I'm testing your example (systemjs folder) but when I try on IExplore the node expand event doesn't working. When I push on the arrow of a node, the node doesn't expand.

How can I fix it?

By the way I don't know exactly how to chante the styles to put different images on nodes and children, can you give an example?

Thank you.

loliparra80 avatar Jun 23 '16 09:06 loliparra80

Hi, I'm aware that there are IE problems, I will try to fix them ASAP. Does it work for you on Chrome / Firefox?

You should use a custom template. Inside the custom template you can check node's methods, like level, isRoot, isLeaf, etc., or just access the original node's data on node.data. Based on whatever you like you can set different images. For example:

'
  <img *ngIf="node.isLeaf" src="leaf-node">
  <img *ngIf="!node.isLeaf" src="parent-node">
'

adamkleingit avatar Jun 23 '16 11:06 adamkleingit

These lines will not work in IE/Edge without polyfill: https://github.com/500tech/angular2-tree-component/blob/222f7c450c91d963d97d2ce9b0854e4f58f0d95b/lib/components/tree.component.ts#L91-96

Currently finding success with this in our polyfills: https://www.npmjs.com/package/element-closest

jFensch avatar Jun 24 '16 16:06 jFensch

Solved in 1.1.9

adamkleingit avatar Jul 14 '16 08:07 adamkleingit