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

Can't bind to 'floatPlaceholder' since it isn't a known property of 'mat-form-field'.

Open neil-coutinho opened this issue 6 years ago • 3 comments

Issue type

I'm submitting a (check one): [x] Bug report [ ] Feature request [ ] Regression (something that used to work, but stopped working in a newer version) [ ] Support request [ ] Documentation issue or request

Prerequisites

Before posting, make sure you do the following (check all): [x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not) [x] Search GitHub for a similar issue or PR [x] If submitting a Support request, also search Stack Overflow for similar issues Note: Please cross-post GitHub support requests to Stack Overflow, and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.

Current behavior

After upgrading to Angular and Angular Material to 6.0.2, You get the following error on production mode i.e. ng serve --prod

ERROR in: Can't bind to 'floatPlaceholder' since it isn't a known property of 'mat-form-field'.

If 'mat-form-field' is an Angular component and it has 'floatPlaceholder' input, then verify that it is part of this module. If 'mat-form-field' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" <mat-form-field [class]="options?.htmlClass || ''" [ERROR ->][floatPlaceholder]="options?.floatPlaceholder || (options?.notitle ? 'never' : 'auto')" [style.")

Expected behavior

Should run w/o any erros

IMPORTANT: How can we reproduce your problem?

Upgrade your Angular version to 6

Upgrade all Angular packages

Environment

OS name & version: macOS Sierra 10.12.6 Browser name & version: Chrome version 66.0.3359.139 (Official Build) (64-bit) Angular version: 6.0.2 Angular JSON Schema Form version(s): ^0.7.0-alpha.1 Other relevant software or packages: Angular CLI: 6.0.3 Node: 8.9.4 OS: darwin x64 Angular: 6.0.2 ... animations, cdk, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

angular-devkit/architect: 0.6.3
angular-devkit/build-angular: 0.6.3
angular-devkit/build-optimizer: 0.6.3 angular-devkit/core: 0.6.3 angular-devkit/build-optimizer: 0.6.3 angular-devkit/schematics: 0.6.3 angular/cli: 6.0.3 angular/flex-layout: 2.0.0-beta.12 angular/material: 6.1.0

Any other relevant information

neil-coutinho avatar May 25 '18 10:05 neil-coutinho

P.S The error can be removed by replacing floatPlaceholder with floatLabel

neil-coutinho avatar May 29 '18 10:05 neil-coutinho

PR to solve this issue. https://github.com/dschnelldavis/angular2-json-schema-form/pull/295

hamzahamidi avatar Jun 28 '18 14:06 hamzahamidi

For people who can't wait for this update to get merged here's a quick fix:

$ npm install git+https://github.com/hamzahamidi/angular2-json-schema-form.git#build-angular-6 --save

You may need to install @angular/flex manually: $ npm i @angular/flex-layout Once this branch get merged, I'll delete the branch so it will not work anymore, in respect to the repo's owner

hamzahamidi avatar Jun 29 '18 14:06 hamzahamidi