dschnelldavis/angular2-json-schema-form

Support and update for angular6

tmburnell opened this issue · 4 comments

I have a team using this tool, and they are upgrading to angular6. And we noticed this has not had any updates since Feb.
Is this component still planned to be publicly supported?
Is there plans to migrate to Angular6?
Is there plans to update material versions?

@tmburnell
Duplicate of at least issues #263 and #302. There is a PR with a working Angular 6 upgrade here: #230 (comment). We've been using the NoFramework option for a little while now, Material version is too buggy in both this and prior versions while other frameworks would force us to load multiple CSS frameworks which would likely collide on several fronts.

Planning on investigating an alternate solution using this library: ngx-formly/ngx-formly#1056. It doesn't currently support JSON schema but otherwise seems to have a pretty solid and stable form generation going on with a growing community. At the very least just generating regular fields is already done and some validation should be possible from that, what I worry more for is when you nest them in arrays and objects on top of that while also supporting every validation available.

@tmburnell You can use Angular6-json-schema-form which is compatible with Angular v6

@hamzahamidi is the link you sent a copy of this repo but you have updated to angular6 for yourself?

@tmburnell It's a continuation to this repository but using angular-cli v6 new generate library option.
The import changed however, for example to use Bootstrap4:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { Bootstrap4FrameworkModule } from 'angular6-json-schema-form';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [ AppComponent ],
  imports: [
    BrowserModule
    Bootstrap4FrameworkModule
  ],
  providers: [],
  bootstrap: [ AppComponent ]
})
export class AppModule { }

And you use the component like the following:

<json-schema-form
loadExternalAssets="true"
[schema]="schema"
framework="bootstrap-4"
(onSubmit)="submit($event)">
</json-schema-form>

If you still face the same issue, can you make a repository to reproduce this issue?