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: Can't bind to 'content-id' since it isn't a known property of 'ion-segment-button' #30095

Open
3 tasks done
rorp24 opened this issue Dec 20, 2024 · 0 comments
Open
3 tasks done
Labels

Comments

@rorp24
Copy link

rorp24 commented Dec 20, 2024

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When I want to bind the content-id property to a ion-segment-button for a dynamically made ion-segment-content, I can't, and I have this error:

ERROR
src/app/nutrition/recette/recette.page.html:154:60 - error NG8002: Can't bind to 'content-id' since it isn't a known property of 'ion-segment-button'.
1. If 'ion-segment-button' is an Angular component and it has 'content-id' input, then verify that it is part of this module.
2. If 'ion-segment-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.



154     <ion-segment-button [value]="'ustensiles-'+recetteId" [content-id]="'ustensiles-'+recetteId">

                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



  src/app/nutrition/recette/recette.page.ts:8:16

    8   templateUrl: './recette.page.html',

                     ~~~~~~~~~~~~~~~~~~~~~

    Error occurs in the template of component RecettePage.

Expected Behavior

I expect ion-segment-button to have the content-id property bindable, so I can have multiples similar pages with a segment-content which have a dynamic id (like this: <ion-segment-content [id]="'ingredients-'+recetteId">)

Steps to Reproduce

just try to bind a content-id property to an ion-segment-button component.

Code Reproduction URL

https://stackblitz.com/edit/angular-mfulfg51?file=src%2Fapp%2Fexample.component.ts

Ionic Info

Ionic:

Ionic CLI : 6.20.3 (C:\Users\robin\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : 8.4.1
@angular-devkit/build-angular : 18.2.12
@angular-devkit/schematics : 18.2.12
@angular/cli : 18.2.12
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : not installed
@capacitor/core : 6.2.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.4.1 (C:\Program Files\nodejs\node.exe)
npm : 10.8.1
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant