How can inject multiple values to my service if I have constructor like this
@Injectable()
export class MyService implements OnInit {
constructor(private http: Http, @Inject('name') @Optional() public name?: string) {
}
and inside AppModule I tried following
...
providers: [
SecurityService, providers:[
{ provide: 'username', useValue: '' },
{ provide: 'http', useValue: Http }
],
..
but I'm getting syntax error in line SecurityService, providers:[
Cannot find name providers