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

Custom Template didn't show dismiss button #218

Open
th3conc3pt3ur opened this issue Aug 18, 2021 · 5 comments
Open

Custom Template didn't show dismiss button #218

th3conc3pt3ur opened this issue Aug 18, 2021 · 5 comments
Labels
discussion Indicates that this issue / PR needs to be discussed in detail before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash type: feature Indicates a feature or enhancement

Comments

@th3conc3pt3ur
Copy link

Hi there,
I give a try to this lib and i'm pretty happy with it ! But i've a little trouble to customize it.

I use a custom template for angular-notifier for adding icon.
When i'm using builtin template i got the dismiss button , but when a use my custom template this button disappears
Custom template :
image

Builtin :
image

My custom template :

<ng-template #customTemplate let-notification="notification">
    <div>
        <fa-icon *ngIf="notification.type == 'error'" [icon]="faExclamationTriangle"></fa-icon> {{ notification.message }}
    </div>
</ng-template>

Should i add this button manually ? if yes how ?
Thx

@VitaliiLitkevichVL
Copy link

VitaliiLitkevichVL commented Sep 24, 2021

I faced with the same problem.
I used this.notifier.hide('THAT_NOTIFICATION_ID');

@Vitomir2
Copy link

Hi, I face the same problem and I cannot find a way to solve it. Please @dominique-mueller, can you update this, or anyone else?

@VitalyLitkevich why you are using hide? This will not help the dismiss button to appear.

@VitaliiLitkevichVL
Copy link

Hi, I face the same problem and I cannot find a way to solve it. Please @dominique-mueller, can you update this, or anyone else?

@VitalyLitkevich why you are using hide? This will not help the dismiss button to appear.

You can add your own custom button in custom template and than use this.notifier.hide('THAT_NOTIFICATION_ID') to hide your notifier

@Vitomir2
Copy link

Vitomir2 commented Jan 19, 2022

Yeah, I just did that, but forgot to edit my comment :) Thanks!

@dominique-mueller dominique-mueller added discussion Indicates that this issue / PR needs to be discussed in detail before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash type: feature Indicates a feature or enhancement labels Feb 20, 2022
@H3AR7B3A7
Copy link

H3AR7B3A7 commented Oct 13, 2022

Here are some slightly more advanced working examples (to those on npm) for working around some of the limitations people have been running in to:

https://stackblitz.com/edit/angular-ivy-yft5xg?file=src/app/app.component.ts

Feel free to fork or use any of it in the docs. Thanks for the nice work @dominique-mueller ! Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Indicates that this issue / PR needs to be discussed in detail before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash type: feature Indicates a feature or enhancement
Projects
None yet
Development

No branches or pull requests

5 participants