Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@input ionContentRef shoud be a valid instance of IonContent #45

Open
rakeshkumar125 opened this issue Apr 10, 2023 · 1 comment
Open

Comments

@rakeshkumar125
Copy link

rakeshkumar125 commented Apr 10, 2023

My header is separate module like below.

<ion-header class="ion-no-border" scrollOpacity [ionContentRef]="mycontent"> <ion-toolbar lines="none" [class.item-background-color]="showToolbar"> <div class="logo" slot="start"> <div class="big-text"> <ion-icon src="/assets/logo.svg"></ion-icon> </div> </div> <ion-buttons slot="end" class=" notificatoin_button"> <ion-back-button [text]="Back" [hidden]="!edited" defaultHref="/home"></ion-back-button> <ion-button [routerLink]="['/notifications']"> <ion-icon class="badge" name="notifications-circle-outline"> </ion-icon> <ion-badge class="badge-one" color="light">{{notification_cnt}}</ion-badge> </ion-button> </ion-buttons> </ion-toolbar> </ion-header>

And above header module call in all pages like below.
<app-header></app-header>

Now I am trying to use this it gives below error.

core.js:4197 ERROR Error: Uncaught (in promise): Error: @input ionContentRef shoud be a valid instance of IonContent
Error: @input ionContentRef shoud be a valid instance of IonContent
at IonHeaderScrollOpacityDirective. (header-scroll-opacity.directive.ts:80:13)
at Generator.next ()

@toriphes
Copy link
Owner

Hello @rakeshkumar125
I haven't tested this kind of scenario but it looks like you need to pass the IonContent instance as @Input of your app-header component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants