core/bootstrap/message-banner/message-banner.component.ts
OnInit
selector | c8y-message-banner |
templateUrl | ./message-banner.component.html |
Properties |
Methods |
dismiss |
dismiss()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
settings$ |
Type : Observable<Partial<MessageBannerSettings>>
|
showBanner$ |
Type : Observable<boolean>
|
<ng-container *ngIf="settings$ | async as settings">
<div *ngIf="showBanner$ | async">
<div
class="alert d-flex"
[class]="'alert-' + settings.messageBannerType"
>
<span
class="flex-grow"
[innerHTML]="settings.messageBannerContent | translate | markdownToHtml | async"
></span>
<button
class="close a-s-start"
[attr.aria-label]="'Close' | translate"
type="button"
(click)="dismiss()"
>
<i
c8yIcon="times"
aria-hidden="true"
></i>
<span class="sr-only">Close</span>
</button>
</div>
</div>
</ng-container>