angular2-json-schema-form icon indicating copy to clipboard operation
angular2-json-schema-form copied to clipboard

(fix #204) move fxLayoutWrap to fxLayout

Open j2L4e opened this issue 6 years ago • 12 comments

fix #204 that's due to https://github.com/angular/flex-layout/blob/master/CHANGELOG.md#breaking-changes

j2L4e avatar Mar 13 '18 10:03 j2L4e

Please merge this ASAP... this will save prod build.

sasos90 avatar Mar 16 '18 13:03 sasos90

Please merge this. We need the production build to work.

Theyssen avatar Mar 19 '18 11:03 Theyssen

The entire library is not working for me because of this issue

lbispham avatar Mar 22 '18 21:03 lbispham

These changes should still work in some earlier beta version of flex-layout but can't find which specific version from reading the changelog: https://github.com/angular/flex-layout/blob/master/CHANGELOG.md

If any change remains I think it'd be to be more specific in the peer-dependency on which beta version this works. I.e. changing this line: https://github.com/dschnelldavis/angular2-json-schema-form/blob/master/package.json#L65.

Agree that this should be a high-priority to merge though.

Koslun avatar Mar 26 '18 10:03 Koslun

It still works with any version < beta 13

j2L4e avatar Mar 26 '18 10:03 j2L4e

Please merge this. We need AOT compilation to work.

DhiaEddineSaidi avatar Apr 19 '18 09:04 DhiaEddineSaidi

I confirm these commits , Please merge.

DhiaEddineSaidi avatar Apr 20 '18 15:04 DhiaEddineSaidi

One more time: Please Merge this. We need this badly.

Theyssen avatar Apr 23 '18 08:04 Theyssen

I think I will make a fork of this repo and give you the reference and merge it in my repo. But I will wait for few days now if they react.

sasos90 avatar Apr 23 '18 10:04 sasos90

I have an update angular 5 branch here: https://github.com/rhalff/angular2-json-schema-form/tree/angular-5

And a angular 6 one over here: https://github.com/rhalff/angular2-json-schema-form/tree/angular-6

This patch has been merged and some other material updates. Both are able to build and serve the demo app without errors.

I have no intention to permanently fork, but a few projects I've created are using this super useful library :-)

If you want to use the branch, you could fork to your own repository and then:

  • npm i
  • npm run deploy

Deploy will push to your repo and create an angular-(5/6)-dist branch

Then in the application consuming the library: npm install <your-repo>/angular2-json-schema-form#angular-5-dist --save or #angular-6-dist

The builds do not solve the forRoot() problem as described in https://github.com/angular/angular/issues/14707, you'll still have to do that manually.

Note: seems like yarn doesn't understand pointing a dependency to a branch on github: https://github.com/yarnpkg/yarn/issues/3720 so you must use npm to install.

rhalff avatar Apr 23 '18 14:04 rhalff

@rhalff Nice work. Forked your fork and hooked it up to a fresh angular 6 example app where I verified that it compiled with latest angular, angular material and flex-layout: https://github.com/Koslun/ng-example-app/tree/feat/ng6-angular2-json-schema-form.

The placeholder for the input elements for MaterialDesign however still don't float, making any placeholder merge with the text you write in the input. So still can't really use MaterialDesign as-is.

Used hack from https://github.com/dschnelldavis/angular2-json-schema-form/issues/189#issuecomment-375728143 to manually fix the forRoot() issue, adding this to the @NgModule imports array:

    NoFrameworkModule,
    {
      ngModule: JsonSchemaFormModule,
      providers: [
        JsonSchemaFormService,
        FrameworkLibraryService,
        WidgetLibraryService,
        { provide: Framework, useClass: NoFramework, multi: true },
      ],
    },

Easier to just have choose one import for each of the different options as you can't use multiple ones or choose to skip using one of them. So maybe instead choose among:

  • JsonSchemaFormNoFrameworkModule,
  • JsonSchemaFormMaterialModule,
  • JsonSchemaFormBootstrap3Module,
  • JsonSchemaFormBootstrapModule,

Koslun avatar May 05 '18 21:05 Koslun

I did something like this. No need to provide NoFramework if you plan to use one


Bootstrap4FrameworkModule,
    {
      ngModule: JsonSchemaFormModule,
      providers: [
        JsonSchemaFormService, FrameworkLibraryService, WidgetLibraryService,
        Bootstrap4FrameworkModule.forRoot().providers[0]
      ]
    },

VirusDEAD avatar Jul 11 '18 09:07 VirusDEAD