Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
neil-coutinho opened this issue May 25, 2018 · 3 comments

Comments

@neil-coutinho
Copy link

neil-coutinho commented May 25, 2018

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
Copy link
Author

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

@hamzahamidi
Copy link

hamzahamidi commented Jun 28, 2018

PR to solve this issue. #295

@hamzahamidi
Copy link

hamzahamidi commented Jun 29, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants