I am having a problem when I created a button in a custom directive:
<button ion-button round>Replay</button>
It seems that the component can’t see the ionic directives ion-button and round - so the button appears as a standard html button.
I have looked on the web and it seems to be a problem with the supplied styles not working in components.
kensodemann commented on 14 Dec 2017
Looking at the code that handles this in the upcoming @ionic/core release (which will be part of Ionic v4) this should no longer be an issue at that time. I will mark this as something to double check after the initial v4 release is complete.
That was over three months ago and who know’s when v4 will be released.
I suppose I could - but unfortunately the problem goes deeper - I can’t even use Ionic standard components as it reports an error:
ERROR Error: Uncaught (in promise): Error: Template parse errors:
‘ion-list-header’ is not a known element:
The statement from Ionic that it will be fixed in v4 is not really acceptable - basically they are saying Ionic 3 components do not use Ionic features, and are not going to fix it.
Just did a search for the above error and found this post which fixed the problem:
The solution was posed by gabfiocchi (reproduced here)
Go to components.module.ts.
You need import the Ionic module.
import { IonicModule } from 'ionic-angular'
Add on ngModule imports.
@NgModule({
declarations: [
...
],
imports: [
IonicModule
],
exports: [
...
]
})