Closed adamkleingit closed 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
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 to
--
On Wed, Mar 15, 2017 at 1:44 PM, Gillardo notifications@github.com wrote:
Agreed. Any updates on this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/500tech/angular-tree-component/issues/191#issuecomment-286718236, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2SSmVy8Pped6GrPxPOkXxxbxQ3Gnpuks5rl88vgaJpZM4MMUl4 .
not only ng-template (i just check you use Renderer while Renderer2's actually)
PS: Why people don't simply use version compatible with 2.x, for theses reasons:
Can people tell here what is the best choice here ?
cc @adamkleingit
The disadvantage of splitting the versions is that we'll need to support 2 versions (so every fix / feature will need to happen on both). But maybe there's a smart way to change only what is needed to make Angular4 work, and stay on the same branch, and release both versions (for 2 and 4)
I would be surprised if people who have developed for angular2 don't upgrade to angular4 because it hasn't been out long, but I understand u want to support both with 1 version
Angular branch 2.x will dissapear this will only make code bigger for nothin if someone want support for ng2 he must use version at this moment I think these people don't move to ng4 they lost new VieEngine this make their code smaller (angular team don't merge this into ng2) They can't make use of last feature there is no reason stay at ng2 first nd second you don't need support two branch but only one (last one)
Bump the versions and continue on with angular4. @Gillardo People who developed for angular2 should upgrade to angular4 asap. This isn't massive breaking changes, the primary reason for the separation is typescript needing to be bumped. Angular is also tested pretty heavily internally at Google as they simply use whatever is on master. So all of googles apps are using 4.0.
I don't think the package should hold back because some people may want to use 2.0 and still want bugs fixes and upgrades, that's not realistic.
Agree @tashoecraft
Agree
+1 The new Angular 4.0.0 is released so it would be nice to be updated fo ng4.
I am not sure if Angular team would provide LTS for version 2.X.X. With the latest 4.0.0 update even the @angular/cli is targeting 4.0 w/o any option to create a backwards 2.0 app. So, I too suggest to move forward and bump the major version to 4.0 with Angular 4.0 support.
Btw, I did a quick Angular 4.0 test app w/ drag and drop support and apart from the already mentioned template issue, didn't get any error messages.
https://my-test-app-ee9c2.firebaseapp.com/
$ ng b --target=production --aot=true --sourcemaps=false
10% building modules 7/7 modules 0 activeTemplate parse warnings:
The <template> element is deprecated. Use <ng-template> instead ("<span *ngIf="!template">loading...</span>
[WARNING ->]<template [ngTemplateOutlet]="template"></template>"): ng:///home/ng4-test-app/node_modules/angular-tree-component/dist/components/loading.component.d.ts.LoadingComponent.html@1:2
Hash: ef71676cc1d3e05b8c09
Time: 25309ms
chunk {0} polyfills.2d45a4c73c85e24fe474.bundle.js (polyfills) 158 kB {4} [initial] [rendered]
chunk {1} main.9af60c13ff4fa931904b.bundle.js (main) 108 kB {3} [initial] [rendered]
chunk {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.1170725e847b5f745654.bundle.js (vendor) 2.4 MB [initial] [rendered]
chunk {4} inline.135918d3945214dac21d.bundle.js (inline) 0 bytes [entry] [rendered]
@angular/cli: 1.0.0
node: 7.7.4
os: linux x64
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
I already use the tree in Angular 4 app, so no issues arise apart from the warning. As I know the changes from Angular2 and 4 and minimal, actually the syntax and concepts are same most of the time, I think the core and other modules are rewritten for better performance and organization. So I think updating the project to Angular 4 will be not so difficult.
Will be handled in the coming 3 days!
--
On Thu, Mar 30, 2017 at 12:34 PM, Dimitar Stojanov <notifications@github.com
wrote:
I already use the tree in Angular 4 app, so no issues arise apart from the warning. As I know the changes from Angular2 and 4 and minimal, actually the syntax and concepts are same most of the time, I think the core and other modules are rewritten for better performance and organization. So I think updating the project to Angular 4 will be not so difficult.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/500tech/angular-tree-component/issues/191#issuecomment-290356212, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2SSmZ9MIqPOSKxzm2r0Km7SdmKRhOFks5rq3c-gaJpZM4MMUl4 .
any news on this now @adamkleingit ?
Yes! Published in 3.2.4. And I checked - it should be backwards compatible with Angular 2.X.X as well
please apologize ther is bug with ng2-mobx when I run npm update
ERROR in ./~/angular-tree-component/dist/models/tree.model.js
Module not found: Error: Can't resolve 'mobx' in 'C:\Users\...\WebstormProjects\i10\node_modules\angular-tree-component\dist\models'
@ ./~/angular-tree-component/dist/models/tree.model.js 11:0-52
@ ./~/angular-tree-component/dist/angular-tree-component.js
@ ./src/app/comptabilite/shared/shared-comptabilite.module.ts
@ ./src/app/shared/dialog/dialog.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:4200 ./src/main.ts
ERROR in ./~/angular-tree-component/dist/models/tree-virtual-scroll.model.js
Module not found: Error: Can't resolve 'mobx' in 'C:\Users\...\WebstormProjects\i10\node_modules\angular-tree-component\dist\models'
@ ./~/angular-tree-component/dist/models/tree-virtual-scroll.model.js 11:0-71
@ ./~/angular-tree-component/dist/angular-tree-component.js
@ ./src/app/comptabilite/shared/shared-comptabilite.module.ts
@ ./src/app/shared/dialog/dialog.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:4200 ./src/main.ts
....
this is the error with rxjs 5.1.0 but today we are in 5.3.0 and there is no more ./observable/dom... import are incorrect and ng2-mobx still problem
it works when I remove in node_module ng2-mobx and mobx and angular-tree-component and run npm install it works well !
cc @adamkleingit
Make sure it's backwards compatible to Angular 2 as well