reverted home-page.component

This commit is contained in:
Giuseppe Digilio
2018-03-07 12:10:11 +01:00
parent 41640210f4
commit 8bfa48467a
2 changed files with 1 additions and 45 deletions

View File

@@ -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>-->

View File

@@ -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();
}
}