Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

[BUG] - Angular 9 with angular-material-formio #59

Open
mprinc opened this issue Mar 8, 2020 · 21 comments
Open

[BUG] - Angular 9 with angular-material-formio #59

mprinc opened this issue Mar 8, 2020 · 21 comments
Labels
bug Something isn't working

Comments

@mprinc
Copy link

mprinc commented Mar 8, 2020

Environment

Please provide as many details as you can:

  • Hosting type
    • [] Form.io
    • [ x] Local deployment
  • Formio.js version: "angular-material-formio": "^1.15.0",
  • Frontend framework: agnular: 9.0.5
  • "typescript": "~3.7.5"
  • Browser: chrome
  • Browser version: 10.15.3

Steps to Reproduce

Hi, after migrating the project from angular 8.3.2 to angular 9.0.5 formio-material started crashing

Will be happy to provide the reproduction scenario if there is a need, but I would first like to understand if the current latest release IS compatible with the latest angular 9?

Observed behavior

As you can see, there is one warning and one error (obviously more critical).

image

@mprinc mprinc added the bug Something isn't working label Mar 8, 2020
@mprinc mprinc changed the title [BUG] - Angular 9 [BUG] - Angular 9 with angular-material-formio Mar 8, 2020
@mprinc
Copy link
Author

mprinc commented Mar 8, 2020

I am aware of this issue #48 which is closed now. It is like 3-4 weeks later, so wondering what is the status?

Would be happy to pull request if you have direction on issues to fix?

@travist
Copy link
Member

travist commented Mar 9, 2020

I probably should not have closed that issue... I am sure I was thinking that was in terms of the angular-formio library (which this library uses as a core lib) which was upgraded to Angular 9.

@mprinc
Copy link
Author

mprinc commented Mar 9, 2020

Thanks @travist.

Yes, the hierarchy is clear to me, thanks. So you are just explaining that the angular-material-formio will be upgraded through angular-formio and we should wait for that?

Any hint on timing or community fixing if it would take it too long to wait?

@travist
Copy link
Member

travist commented Mar 15, 2020

The angular-formio library has been updated. We just need update this library. Preferably make it reverse compatible so it can be used on 8 or 9.

@travist
Copy link
Member

travist commented Mar 15, 2020

If the community wants to chime in to help with this it would be greatly appreciated. It is pretty far down on our internal priority list.

@jonasscript
Copy link

I am trying to install angular-material-formio verision 4.6.12 in Angular 9.0.7, I have updated the angular-formio library to verison 1.18.0, however it presents me the bug mentioned by Sasha Rudan, is there any solution for my verison current Angular?

@travist
Copy link
Member

travist commented Mar 23, 2020

We still have not upgraded this library to Angular 9. It is on our backlog, but we are still not to that point yet. We are open to any community contributions that would like to take a stab at this and submit a pull request.

@rspsuresh
Copy link

rspsuresh commented Mar 30, 2020

Could not replace this.form value while i am using service via replace this.form ,any idea is there please share me as soon as possible.

It only works statically assign value to this.form value

@vlad-shusterman
Copy link
Contributor

@rspsuresh
It works well.
For example if you have component like that

<mat-formio [form]="formLayout"

You can modify formLayout object on different conditions and it will affect UI.

@mprinc
Copy link
Author

mprinc commented Apr 1, 2020

We still have not upgraded this library to Angular 9. It is on our backlog, but we are still not to that point yet. We are open to any community contributions that would like to take a stab at this and submit a pull request.

Thanks @travist, we are considering to do the upgrade. Are there any perks regarding the upgrade process you need to share with us?

@albert5287
Copy link

I have opened a pr #92 with the update,. I hope it could be merge soon.

@mprinc
Copy link
Author

mprinc commented Jun 6, 2020

Thanks, @albert5287, we took your PR, or rather your fork into our fork.

Regarding the building process, everything was fine with the PR, but when we wanted to use it, we had issues with angular not recognizing properties like form property: Can't bind to 'form' since it isn't a known property of 'mat-formio'.

@travist we had to tweak the library and with that, we managed to get it running in both dev and prod env.

If someone wants more info we can provide, and we are happy to help with the official upgrade. In the meantime, we couldn't wait as we were pushed with the AOT related bugs (JS/TS decorators, etc) so we had to migrate our projects to Angular 9.

If anyone else is critical until the official v2 gets out, here it is installable solution: https://github.com/mprinc/angular-material-formio/releases/tag/1.3.5

@stefanofalasca
Copy link

is there a planing about close this issue, closing pr #92 ?

@stefanofalasca
Copy link

Thanks, @albert5287, we took your PR, or rather your fork into our fork.

Regarding the building process, everything was fine with the PR, but when we wanted to use it, we had issues with angular not recognizing properties like form property: Can't bind to 'form' since it isn't a known property of 'mat-formio'.

@travist we had to tweak the library and with that, we managed to get it running in both dev and prod env.

If someone wants more info we can provide, and we are happy to help with the official upgrade. In the meantime, we couldn't wait as we were pushed with the AOT related bugs (JS/TS decorators, etc) so we had to migrate our projects to Angular 9.

If anyone else is critical until the official v2 gets out, here it is installable solution: https://github.com/mprinc/angular-material-formio/releases/tag/1.3.5

I tried to use your fork but there is an error on rendering:
ERROR NullInjectorError: R3InjectorError(PagesModule)[FormioLoader -> FormioLoader -> FormioLoader -> FormioLoader]:

@mprinc
Copy link
Author

mprinc commented Jul 24, 2020

Hi, @stefanofalasca

It is hard for me to understand the reason for your error just based on this single line.

Few hints:

  • we had to integrate angular-formio inside the angular-material-formio as otherwise, it was reporting errors, so you might try to remove angular-formio as a dependency, but I wouldn't
  • you might also have a wrong version of it, as some newer versions of angular-formio are not compatible with angular-material-formio, so the latest working is "angular-formio": "^4.4.4",
  • you can also try to read (rather-internal) document on the process: https://github.com/mprinc/angular-material-formio/blob/master/upgrading-README.md
  • and finally you can just use is as this, prebuilt:
"dependencies": {
    "angular-formio": "^4.4.4",
    "angular-material-formio": "https://github.com/mprinc/angular-material-formio/releases/download/1.3.5/angular-material-formio-1.3.5.tgz",
    // ...
}

Please let me know if this helps

@markoberger
Copy link

What is the status of this lib? I'm considering using it on one big project. But I tried to install it on Angular 10 and still it not working.

@travist
Copy link
Member

travist commented Oct 26, 2020

We are going to have a developer allocated to upgrade this library very soon, but we are behind on our other backlog items. It should happen before the end of the year.

@kenobi-io
Copy link

kenobi-io commented Nov 17, 2020

@travist This is a very cool library, thank you very much, you make life a lot easier, but I can't use it with 10 angular
What is the status of this lib?

@travist
Copy link
Member

travist commented Nov 17, 2020

We already have a pull request. #154

We just need the time to test it and get it released. We are very backed up on other releases right now, so this is just going to have to wait. It would be beneficial if everyone tested out that PR ^ to verify if it works.

@mprinc
Copy link
Author

mprinc commented Nov 17, 2020

When I was integrating patches to make it work, I issued various problems, so I am not sure if it would be that simple to test the PR, can you issue som unofficial release that we can test from github, same as I did: #59 (comment)

@benwinding
Copy link

Still seems to be an issue binding to form like this: <mat-formio [form]="formValue" ></mat-formio>.

Although it seems to compile, VScode just shows an error (see image below), so not sure where the issue is....

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants