mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 21:13:07 +00:00
reverted home-page.component
This commit is contained in:
@@ -3,16 +3,3 @@
|
||||
<ds-search-form></ds-search-form>
|
||||
<ds-top-level-community-list></ds-top-level-community-list>
|
||||
</div>
|
||||
|
||||
<button (click)="createNotification()">Notify!</button>
|
||||
<button (click)="createNotification1()">Notify!</button>
|
||||
<button (click)="createNotification2()">Notify!</button>
|
||||
|
||||
|
||||
<button (click)="deleteHtmlNotification()">Delete Html Notification</button>
|
||||
<button (click)="deleteAllNotifications()">Delete All</button>
|
||||
|
||||
<!--<ng-template #example>-->
|
||||
<!--<p>Simple Error example</p>-->
|
||||
<!--<button [routerLink]="['/mydspace']">Go to mydspace</button>-->
|
||||
<!--</ng-template>-->
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { Component, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { NotificationsService } from '../shared/notifications/notifications.service';
|
||||
import { NotificationOptions } from '../shared/notifications/models/notification-options.model';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-home-page',
|
||||
@@ -8,33 +6,4 @@ import { NotificationOptions } from '../shared/notifications/models/notification
|
||||
templateUrl: './home-page.component.html'
|
||||
})
|
||||
export class HomePageComponent {
|
||||
@ViewChild('example') example: TemplateRef<any>;
|
||||
|
||||
private htmlNotification;
|
||||
|
||||
constructor(private notificationsService: NotificationsService) {
|
||||
}
|
||||
|
||||
createNotification() {
|
||||
const n1 = this.notificationsService.success('Welcome in DSpace', 'Good choice!',
|
||||
new NotificationOptions(10000, true, 'fromLeft', ['bottom', 'left']));
|
||||
}
|
||||
|
||||
createNotification1() {
|
||||
const n1 = this.notificationsService.warning('Welcome in DSpace', 'Good choice!',
|
||||
new NotificationOptions(10000, false, 'fromLeft', ['bottom', 'left']));
|
||||
}
|
||||
|
||||
createNotification2() {
|
||||
const html = "<h1>Html Alert</h1> <p><button [routerLink]=\"['/mydspace']\">Go to mydspace</button></p>";
|
||||
this.htmlNotification = this.notificationsService.info('Ciao', null, null, html);
|
||||
}
|
||||
|
||||
deleteHtmlNotification() {
|
||||
this.notificationsService.remove(this.htmlNotification);
|
||||
}
|
||||
|
||||
deleteAllNotifications() {
|
||||
this.notificationsService.removeAll();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user