rete icon indicating copy to clipboard operation
rete copied to clipboard

Angular render plugin

Open Ni55aN opened this issue 6 years ago • 20 comments

Ni55aN avatar Aug 26 '19 09:08 Ni55aN

I figured out how to render many HTML elements -> @angular/elements. For example, on rendernode I can insert <rete-node></rete-node> to el, where rete-node is a custom element (Angular component will be rendered to tag with that name)

Unfortunately I cannot continue development due to StaticInjectorError for locally installed dependencies https://github.com/angular/angular-cli/issues/11199

preserveSymlinks doesn't help, checked on Windows 10 and WSL (ubuntu)

Ni55aN avatar Aug 26 '19 09:08 Ni55aN

https://github.com/retejs/angular-render-plugin

Ni55aN avatar Aug 26 '19 09:08 Ni55aN

How to reproduce yout error ?

I have done

  • npm i
  • npm run build I get error : Module '@angular/compiler' not found

also I don't find angular.json file in project, is it normal ?

Githamza avatar Aug 29 '19 09:08 Githamza

also I don't find angular.json file in project, is it normal ?

yes, ng-packagr doesn't require that

Ni55aN avatar Aug 29 '19 09:08 Ni55aN

yes, ng-packagr doesn't require that

ok, so you have tried preserveSymlinks solution inside ng-package.json that's it ? Because in the mentioned issue the solution was by using angular.json file and ng build

Githamza avatar Aug 29 '19 12:08 Githamza

tried preserveSymlinks solution inside ng-package.json

No, I used this in the application's angular.json

Ni55aN avatar Aug 29 '19 19:08 Ni55aN

So far, I have not found a way to make this work through the installation of a local package. There are that it works on version 5, my in my case (ver 7) its not working.

 This is one of the reasons why I do not recommend using Angular.

Ni55aN avatar Aug 29 '19 23:08 Ni55aN

The first version of this plugin has been released v0.1.0

Example: https://github.com/retejs/examples/tree/master/Angular/src

Ni55aN avatar Sep 03 '19 00:09 Ni55aN

Great job !

Githamza avatar Sep 03 '19 06:09 Githamza

Hi, First: Im impressed by the rete library and I think that it is really useful! I have been playing around a little bit with it in an angular 8 application. I sue the vue-renderer, but I would like to not reference any vue inside my application. So I tested the angular-render-plugin (0.1.0). I have built my example on the rete/examples/angular project and bumped to version 8 of angular. When I build the project, I get the following: ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 13970:30-43 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 13995:32-45 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14238:33-46 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14287:33-46 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14491:22-35 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14568:28-41 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./src/polyfills.ts

Is this due to the new compiler in angular 8 or is it something in the rete-angular-library?

It would be really nice to have a working angular 8 example with the rete-angular-render-plugin.

testermax avatar Sep 24 '19 12:09 testermax

Hi, First: Im impressed by the rete library and I think that it is really useful! I have been playing around a little bit with it in an angular 8 application. I sue the vue-renderer, but I would like to not reference any vue inside my application. So I tested the angular-render-plugin (0.1.0). I have built my example on the rete/examples/angular project and bumped to version 8 of angular. When I build the project, I get the following: ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 13970:30-43 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 13995:32-45 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14238:33-46 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14287:33-46 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14491:22-35 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./node_modules/rete-angular-render-plugin/node_modules/@angular/core/fesm2015/core.js 14568:28-41 "export 'jitExpression' was not found in '@angular/compiler' ERROR in ./src/polyfills.ts

Is this due to the new compiler in angular 8 or is it something in the rete-angular-library?

It would be really nice to have a working angular 8 example with the rete-angular-render-plugin.

try to retrograde to angular 7 ?

Githamza avatar Sep 24 '19 13:09 Githamza

Im not sure what you mean by :

try to retrograde to angular 7 ?

You mean going back to angular 7? If so, that is not what I want, I want to be on version 8, and later this year on 9.

Or do you mean setting som options when I bump from 7 to 8?

testermax avatar Sep 24 '19 13:09 testermax

Im not sure what you mean by :

try to retrograde to angular 7 ?

You mean going back to angular 7? If so, that is not what I want, I want to be on version 8, and later this year on 9.

Or do you mean setting som options when I bump from 7 to 8?

May be without using the ivy renderer so just disable it on v8

Githamza avatar Sep 24 '19 14:09 Githamza

May be without using the ivy renderer so just disable it on v8.

This did not solve unfortunately, but thanks for the tip. Have you managed to run the angular-renderer under angular v8?

testermax avatar Sep 24 '19 16:09 testermax

@testermax I will post a version with corresponding dependencies for Angular 8, but I'm not sure how to manage version identifiers for multiple dependencies independently

Ni55aN avatar Sep 24 '19 19:09 Ni55aN

I found temporary solution: install dependencies as peerDependencies.

In this way @angular/core, etc. will be installed once and the render plugin will use the same as your application

https://www.npmjs.com/package/rete-angular-render-plugin/v/0.1.1

Ni55aN avatar Sep 24 '19 20:09 Ni55aN

@Ni55aN Thank you! This works like a charm. Fingers crossed this will work in angular 9 as well.

testermax avatar Sep 25 '19 06:09 testermax

@testermax I guess. If this plugin uses a feature from v7, which has major changes in the next version, a crash will occur. So I still need a version management for different Angular major versions

Ni55aN avatar Sep 25 '19 11:09 Ni55aN

Actually l'm using it and I get not problem with the plugin

Githamza avatar Dec 04 '19 09:12 Githamza

For me, everything works fine since I use the newest version v0.2.0-rc.1 and thus having resolved the issue https://github.com/retejs/angular-render-plugin/issues/7#issue-534525504

WieFel avatar Jan 25 '20 10:01 WieFel