Angular-tree-component: Adapt to Angular 4-rc

Created on 26 Feb 2017  Â·  19Comments  Â·  Source: CirclonGroup/angular-tree-component

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

Priority

Most helpful comment

+1 The new Angular 4.0.0 is released so it would be nice to be updated fo ng4.

All 19 comments

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

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

Agreed. Any updates on this?

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