Submitting a bug report
- Library Version: aurelia-bootstrapper 2.3.2, aurelia-cli 1.2.3
- Operating System: OSX 10.15, Windows 10 (does not matter)
- Node Version: 10.15, 13.8
- NPM Version: 6.13.7, 6.4.1
- Webpack Version webpack 4.27
- Browser: Chrome 79 | Firefox 73 (guess, it does not matter)
- Language: TypeScript 3.1.2
Current behavior:
Several custom elements cannot inherit the same base class (please, do not close issue at this point, at least, read the "Desired behavior" section first).
Repo that reproduces bug: https://github.com/partyzzzan/extend-err-app
Note, the 1st commit represent a bug (git checkout bug), the 2nd and the 3rd commits are possible workarounds.
When you open root, Home custom element is rendered:

Let's click open foo - it opens FooContainer that in turn contains FooItem:

Let's get back to home and then go to bar - it opens BarContainer that in turn contains BarItem:

Nothing rendered and no any errors in console:

Both BarItem and FooItem extends same generic SomeComponentBase<TModel>
But let's get back to foo again:

Note, bar's template rendered with foo's model.
Two possible workarounds:
- do not use inheritance
- explicitly decorate
FooItem and BarItem with @customElement decorator
Desired behavior
As of #463 (and other issues) I guess, this one should not be closed without fix. The issue is not about the behavior itself, but about the fact, that there is no any errors in console or anything else, no information at all for developers - what happened or what to do.
It would be nice to have something like:
Use decorators, not inheritance.
(c) #463 (comment)
Submitting a bug report
Current behavior:
Several custom elements cannot inherit the same base class (please, do not close issue at this point, at least, read the "Desired behavior" section first).
Repo that reproduces bug: https://github.com/partyzzzan/extend-err-app
Note, the 1st commit represent a bug (
git checkout bug), the 2nd and the 3rd commits are possible workarounds.When you open root,

Homecustom element is rendered:Let's click open

foo- it opensFooContainerthat in turn containsFooItem:Let's get back to

homeand then go tobar- it opensBarContainerthat in turn containsBarItem:Nothing rendered and no any errors in console:

Both
BarItemandFooItemextends same genericSomeComponentBase<TModel>But let's get back to foo again:

Note,
bar's template rendered withfoo's model.Two possible workarounds:
FooItemandBarItemwith@customElementdecoratorDesired behavior
As of #463 (and other issues) I guess, this one should not be closed without fix. The issue is not about the behavior itself, but about the fact, that there is no any errors in console or anything else, no information at all for developers - what happened or what to do.
It would be nice to have something like:
Use decorators, not inheritance.
(c) #463 (comment)