ionic-team / ionic-team/ionic-framework

bug: Angular: Can't bind to 'content-id' since it isn't a known property of 'ion-segment-button'

Đang mở
#30,095 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### 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

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

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: )

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.