In the past, I utilized provide
from @angular/core.
For example:
import {provide} from '@angular/core';
import {ToastOptions} from "ng2-toastr/ng2-toastr";
let options = {
positionClass: 'toast-bottom-right',
};
//then used inside providers array as :
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing
],
providers: [
appRoutingProviders,
ConfigService,
ToastsManager,
provide(ToastOptions, { useValue: new ToastOptions(options)})
],
bootstrap: [AppComponent]
})
export class AppModule { }
However, I am unsure how to achieve this in Angular 2 final version?
Can anyone provide any insights on how to accomplish this in Angular 2 final?