From b28e4e5e080646ec67363cb0a16c9bd97ccffb35 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Feb 2019 10:16:04 +0100 Subject: Add user notification animation --- client/src/app/shared/users/user-notifications.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/users/user-notifications.component.ts') diff --git a/client/src/app/shared/users/user-notifications.component.ts b/client/src/app/shared/users/user-notifications.component.ts index b5f9fd399..ce43b604a 100644 --- a/client/src/app/shared/users/user-notifications.component.ts +++ b/client/src/app/shared/users/user-notifications.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core' +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { UserNotificationService } from '@app/shared/users/user-notification.service' import { UserNotificationType } from '../../../../../shared' import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' @@ -15,6 +15,8 @@ export class UserNotificationsComponent implements OnInit { @Input() infiniteScroll = true @Input() itemsPerPage = 20 + @Output() notificationsLoaded = new EventEmitter() + notifications: UserNotification[] = [] // So we can access it in the template @@ -43,6 +45,8 @@ export class UserNotificationsComponent implements OnInit { result => { this.notifications = this.notifications.concat(result.data) this.componentPagination.totalItems = result.total + + this.notificationsLoaded.emit() }, err => this.notifier.error(err.message) -- cgit v1.2.3