mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1549] Added files for Core library (#2345)
* [ADF-1549] Added files for Core library * [ADF-1549] Updated md files following checks
This commit is contained in:
committed by
Eugenio Romano
parent
12e54da11c
commit
1c6866f7d1
50
docs/notification.service.md
Normal file
50
docs/notification.service.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Notification Service
|
||||
|
||||
Shows a notification message with optional feedback.
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Details
|
||||
|
||||
The Notification Service is implemented on top of the Angular 2 Material Design snackbar.
|
||||
Use this service to show a notification message, and optionally get feedback from it.
|
||||
|
||||
```ts
|
||||
import { NotificationService } from 'ng2-alfresco-core';
|
||||
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
constructor(private notificationService: NotificationService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.notificationService.openSnackMessage('test', 200000).afterDismissed().subscribe(() => {
|
||||
console.log('The snack-bar was dismissed');
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
import { NotificationService } from 'ng2-alfresco-core';
|
||||
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
constructor(private notificationService: NotificationService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.notificationService.openSnackMessageAction('Do you want to report this issue?', 'send', 200000).afterDismissed().subscribe(() => {
|
||||
console.log('The snack-bar was dismissed');
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user