-
Notifications
You must be signed in to change notification settings - Fork 102
/
index.ts
36 lines (31 loc) · 1.13 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty
import { NgModule, ModuleWithProviders } from "@angular/core";
import { CommonModule } from '@angular/common';
export * from './src/toasty.service';
export * from './src/toasty.component';
export * from './src/toast.component';
export * from './src/shared';
import { ToastyComponent } from './src/toasty.component';
import { ToastComponent } from './src/toast.component';
import { SafeHtmlPipe } from './src/shared';
import { ToastyService, ToastyConfig, toastyServiceFactory } from './src/toasty.service';
export let providers = [
ToastyConfig,
{ provide: ToastyService, useFactory: toastyServiceFactory, deps: [ToastyConfig] }
];
@NgModule({
imports: [CommonModule],
declarations: [ToastComponent, ToastyComponent, SafeHtmlPipe],
exports: [ ToastComponent, ToastyComponent],
providers: providers
})
export class ToastyModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: ToastyModule,
providers: providers
};
}
}