Reputation: 34061
I am trying to learn angular2 with typescript and there is a code does I do not understand:
export var userServiceInjectables: Array<any> = [
bind(UserService).toClass(UserService)
];
Could someone please explain me, what does code do?
Upvotes: 1
Views: 51
Reputation: 657008
That's a very old way to define providers and is already removed in RC.6.
The current syntax is:
providers: [UserService]
or the long form
providers: [{provide: UserService, useClass: UserService}]
Upvotes: 2