Skip to content

Instantly share code, notes, and snippets.

@adrianfaciu
Last active October 22, 2018 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianfaciu/0311ab00e836066d6a02690873f43db0 to your computer and use it in GitHub Desktop.
Save adrianfaciu/0311ab00e836066d6a02690873f43db0 to your computer and use it in GitHub Desktop.
public static forRoot(config = defaultToastConfig): ModuleWithProviders {
return {
ngModule: ToastModule,
providers: [
{
provide: TOAST_CONFIG_TOKEN,
useValue: { ...defaultToastConfig, ...config },
},
],
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment