|
1 | | -import { NgModule } from '@angular/core'; |
2 | | -import { BrowserModule } from '@angular/platform-browser'; |
3 | | - |
4 | | -import { NotifierModule, NotifierOptions } from './../lib/index'; |
5 | | - |
6 | | -import { AppComponent } from './app.component'; |
7 | | - |
8 | | -/** |
9 | | - * Custom angular notifier options |
10 | | - */ |
11 | | -const customNotifierOptions: NotifierOptions = { |
12 | | - position: { |
13 | | - horizontal: { |
14 | | - position: 'left', |
15 | | - distance: 12 |
16 | | - }, |
17 | | - vertical: { |
18 | | - position: 'bottom', |
19 | | - distance: 12, |
20 | | - gap: 10 |
21 | | - } |
22 | | - }, |
23 | | - theme: 'material', |
24 | | - behaviour: { |
25 | | - autoHide: false, |
26 | | - onClick: false, |
27 | | - onMouseover: 'pauseAutoHide', |
28 | | - showDismissButton: true, |
29 | | - stacking: 4 |
30 | | - }, |
31 | | - animations: { |
32 | | - enabled: true, |
33 | | - show: { |
34 | | - preset: 'slide', |
35 | | - speed: 300, |
36 | | - easing: 'ease' |
37 | | - }, |
38 | | - hide: { |
39 | | - preset: 'fade', |
40 | | - speed: 300, |
41 | | - easing: 'ease', |
42 | | - offset: 50 |
43 | | - }, |
44 | | - shift: { |
45 | | - speed: 300, |
46 | | - easing: 'ease' |
47 | | - }, |
48 | | - overlap: 150 |
49 | | - } |
50 | | -}; |
51 | | - |
52 | | -/** |
53 | | - * App module |
54 | | - */ |
55 | | -@NgModule( { |
56 | | - bootstrap: [ |
57 | | - AppComponent |
58 | | - ], |
59 | | - declarations: [ |
60 | | - AppComponent |
61 | | - ], |
62 | | - imports: [ |
63 | | - BrowserModule, |
64 | | - NotifierModule.withConfig( customNotifierOptions ) |
65 | | - ] |
66 | | -} ) |
67 | | -export class AppModule {} |
| 1 | +import { NgModule } from '@angular/core'; |
| 2 | +import { BrowserModule } from '@angular/platform-browser'; |
| 3 | + |
| 4 | +import { NotifierModule, NotifierOptions } from './../lib/index'; |
| 5 | + |
| 6 | +import { AppComponent } from './app.component'; |
| 7 | + |
| 8 | +/** |
| 9 | + * Custom angular notifier options |
| 10 | + */ |
| 11 | +const customNotifierOptions: NotifierOptions = { |
| 12 | + position: { |
| 13 | + horizontal: { |
| 14 | + position: 'left', |
| 15 | + distance: 12 |
| 16 | + }, |
| 17 | + vertical: { |
| 18 | + position: 'bottom', |
| 19 | + distance: 12, |
| 20 | + gap: 10 |
| 21 | + } |
| 22 | + }, |
| 23 | + theme: 'material', |
| 24 | + behaviour: { |
| 25 | + autoHide: {default: 5000,info: 2000,success: 10000,error: false}, |
| 26 | + onClick: false, |
| 27 | + onMouseover: 'pauseAutoHide', |
| 28 | + showDismissButton: true, |
| 29 | + stacking: 4 |
| 30 | + }, |
| 31 | + animations: { |
| 32 | + enabled: true, |
| 33 | + show: { |
| 34 | + preset: 'slide', |
| 35 | + speed: 300, |
| 36 | + easing: 'ease' |
| 37 | + }, |
| 38 | + hide: { |
| 39 | + preset: 'fade', |
| 40 | + speed: 300, |
| 41 | + easing: 'ease', |
| 42 | + offset: 50 |
| 43 | + }, |
| 44 | + shift: { |
| 45 | + speed: 300, |
| 46 | + easing: 'ease' |
| 47 | + }, |
| 48 | + overlap: 150 |
| 49 | + } |
| 50 | +}; |
| 51 | + |
| 52 | +/** |
| 53 | + * App module |
| 54 | + */ |
| 55 | +@NgModule( { |
| 56 | + bootstrap: [ |
| 57 | + AppComponent |
| 58 | + ], |
| 59 | + declarations: [ |
| 60 | + AppComponent |
| 61 | + ], |
| 62 | + imports: [ |
| 63 | + BrowserModule, |
| 64 | + NotifierModule.withConfig( customNotifierOptions ) |
| 65 | + ] |
| 66 | +} ) |
| 67 | +export class AppModule {} |
0 commit comments