Skip to content

bug: angular component does not define required inputs #656

@maciej-klemarczyk-se

Description

@maciej-klemarczyk-se

Prerequisites

Stencil Version

4.35.1

Stencil Framework Output Target

Angular

Stencil Framework Output Target Version

1.0.0

Current Behavior

I define the component as required according to Stencil documentation : https://stenciljs.com/docs/properties#required-properties

But in the wrapper/proxy library for Angular the property is not defined as required.

@Component({
  selector: 'my-component',
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: '<ng-content></ng-content>',
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
  inputs: ['checkboxOnly'],
})

Expected Behavior

I expect that such properties will be defined as required in Angular proxy.

@Component({
  selector: 'my-component',
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: '<ng-content></ng-content>',
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
  inputs: [{name:'checkboxOnly', required:true}],
})

Steps to Reproduce

Create new stencil with one component and mark one of the properties as required.

Code Reproduction URL

Unable to share the library.

Additional Information

I searched the documentation and Angular integration documentation does not specify that I need some special configuration for this behavior. At the moment the stencil created bad quality Angular wrapper library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanteda good issue for the communitytype: featureNew feature, request or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions