-
-
Notifications
You must be signed in to change notification settings - Fork 835
Component inheritance #172
Copy link
Copy link
Closed
Labels
Awaiting ReplyThis PR or Issue needs a reply from the original reporter.This PR or Issue needs a reply from the original reporter.ionitron: stale issueThis issue has not seen any activity for a long period of timeThis issue has not seen any activity for a long period of time
Metadata
Metadata
Assignees
Labels
Awaiting ReplyThis PR or Issue needs a reply from the original reporter.This PR or Issue needs a reply from the original reporter.ionitron: stale issueThis issue has not seen any activity for a long period of timeThis issue has not seen any activity for a long period of time
Resources:
Before submitting an issue, please consult our docs.
Stencil version: (run
npm list @stencil/corefrom a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
If a component extends another component then the props, state, etc. are not inheritted.
Expected behavior:
It should be possible to extend a component and have the derived component inherit the base class features (Prop, State, etc.).
This is the behavior with Ionic v3 using Angular so existing apps would break when moving to Ionic v4.
One use case for inheritance is a base component with all of the logic (properties, event handling, etc.) and derived implementations with alternate rendering methods. For example, a component that can render with Bootstrap markup on the web and Ionic markup in an app.
Related code:
Produces the following output: