CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.09k stars 490 forks source link

Adapt to Angular 4-rc #191

Closed adamkleingit closed 7 years ago

adamkleingit commented 7 years ago

Make sure it's backwards compatible to Angular 2 as well

elvisbegovic commented 7 years ago

actually with ng4 I get this info:

Template parse warnings:
The <template> element is deprecated. Use <ng-template> instead ("op-slot [dropIndex]="node.index + 1" [node]="node.parent"></tree-node-drop-slot>
      </div>
      [ERROR ->]<template
        [ngTemplateOutlet]="templates.treeNodeFullTemplate"
        [ngOutletContext]="{ $i"): TreeNodeComponent@33:6
_warn @ core.es5.js:98
warn @ core.es5.js:1447
parse @ compiler.es5.js:3265
_compileTemplate @ compiler.es5.js:8041
(anonymous) @ compiler.es5.js:8021
_compileComponents @ compiler.es5.js:8021
createResult @ compiler.es5.js:8000
webpackJsonp.591.ZoneDelegate.invoke @ zone.js:330
webpackJsonp.591.Zone.run @ zone.js:126
(anonymous) @ zone.js:679
webpackJsonp.591.ZoneDelegate.invokeTask @ zone.js:363
webpackJsonp.591.Zone.runTask @ zone.js:166
drainMicroTaskQueue @ zone.js:529
core.es5.js:98 Template parse warnings:
The <template> element is deprecated. Use <ng-template> instead ("<span *ngIf="!template">{{ node.displayField }}</span>
  [ERROR ->]<template
    [ngTemplateOutlet]="template"
    [ngOutletContext]="{ $implicit: node, node: node, ind"): TreeNodeContent@1:2
_warn @ core.es5.js:98
warn @ core.es5.js:1447
parse @ compiler.es5.js:3265
_compileTemplate @ compiler.es5.js:8041
(anonymous) @ compiler.es5.js:8021
_compileComponents @ compiler.es5.js:8021
createResult @ compiler.es5.js:8000
webpackJsonp.591.ZoneDelegate.invoke @ zone.js:330
webpackJsonp.591.Zone.run @ zone.js:126
(anonymous) @ zone.js:679
webpackJsonp.591.ZoneDelegate.invokeTask @ zone.js:363
webpackJsonp.591.Zone.runTask @ zone.js:166
drainMicroTaskQueue @ zone.js:529
core.es5.js:98 Template parse warnings:
The <template> element is deprecated. Use <ng-template> instead ("<span *ngIf="!template">loading...</span>
  [ERROR ->]<template [ngTemplateOutlet]="template"></template>"): LoadingComponent@1:2
_warn @ core.es5.js:98
warn @ core.es5.js:1447
parse @ compiler.es5.js:3265
_compileTemplate @ compiler.es5.js:8041
(anonymous) @ compiler.es5.js:8021
_compileComponents @ compiler.es5.js:8021
createResult @ compiler.es5.js:8000
webpackJsonp.591.ZoneDelegate.invoke @ zone.js:330
webpackJsonp.591.Zone.run @ zone.js:126
(anonymous) @ zone.js:679
webpackJsonp.591.ZoneDelegate.invokeTask @ zone.js:363
webpackJsonp.591.Zone.runTask @ zone.js:166
drainMicroTaskQueue @ zone.js:529
mobx.js:1982 [mobx.array] Attempt to read an array index (0) that is out of bounds (0). Please check length first. Out of bound indices will not be tracked by MobX
elvisbegovic commented 7 years ago

I think you don't need "Make sure it's backwards compatible to Angular 2 as well" Add simply something like : NOTE: If you need support for ~Angular2, use version x.x.x

Gillardo commented 7 years ago

Agreed. Any updates on this?

adamkleingit commented 7 years ago

Anybody wants to make a pull request for this? It must be backwards compatible because I don't want to force people to upgrade to Angular 4. If the only difference is changing