[BUG] - Angular 9 with angular-material-formio
mprinc opened this issue · 21 comments
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).
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?
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.
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?
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.
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.
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?
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.
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
@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.
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?
I have opened a pr #92 with the update,. I hope it could be merge soon.
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
is there a planing about close this issue, closing pr #92 ?
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]:
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 theangular-material-formio
as otherwise, it was reporting errors, so you might try to removeangular-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 withangular-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
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.
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.
@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?
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.
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)