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

bug: Angular Web Components Accessing formControlName #19326

Closed
codercatdev opened this issue Sep 12, 2019 · 5 comments
Closed

bug: Angular Web Components Accessing formControlName #19326

codercatdev opened this issue Sep 12, 2019 · 5 comments
Labels
needs: reply the issue needs a response from the user

Comments

@codercatdev
Copy link

Bug Report

Ionic version:
[x] 4.9.0

Current behavior:
Possibly related to #6938.
When using Angular Webcomponents with Ionic core I cannot use formControlName on ion-input. It will only work with a regular input element.

Error: No value accessor for form control with name: 'displayName'

Expected behavior:
Pass the attributes forward (if possible) to the underlying input element that is produced within the slot of ion-input.

Steps to reproduce:

Use stackblitz as a good example.

Related code:

Working example
https://stackblitz.com/edit/ionic-core-angular-webcomponent-working

Not working
https://stackblitz.com/edit/ionic-core-angular-webcomponent-not-working

Ionic info:
image

@ionitron-bot ionitron-bot bot added the triage label Sep 12, 2019
@DavidStrausz
Copy link
Contributor

Try adding the ngDefaultControl attribute to the element.

@liamdebeasi
Copy link
Member

Thanks for the issue. I noticed you have @ionic/core as a dependency, but you also are manually including a version of @ionic/core in index.html. Does it work if you have @ionic/angular as a dependency instead of just @ionic/core?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Sep 12, 2019
@ionitron-bot ionitron-bot bot removed the triage label Sep 12, 2019
@codercatdev
Copy link
Author

I have added ngDefaultControl to the element still failing. I removed @ionic/core from dependencies as this really wasn't doing anything. I would rather leave this as manually adding as the web component is supposed to be usable inside of an Ionic Core app, not the angular version.

In this case we are just using index.html as if it were another site completely, to test the web components.

I also removed @ionic/core from the working version just to verify...and it still does work.

Hope that helps.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Sep 13, 2019
@liamdebeasi
Copy link
Member

liamdebeasi commented Aug 21, 2020

Thanks for the issue. Is this still an issue with the latest version of Ionic Framework? If, so can you please try to reproduce this inside of an Ionic Framework starter application? I noticed that your original examples are not correctly installing Ionic Framework, which may be the cause of the issue.

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Aug 21, 2020
@ionitron-bot ionitron-bot bot removed the triage label Aug 21, 2020
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2020

Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

@ionitron-bot ionitron-bot bot closed this as completed Sep 4, 2020
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

3 participants