Angular2 doesn't support to register providers with the `@Injectable()` 
annotation, only for `@Component()`, `@Directive()`, and I think `@Pipe()`
https://github.com/angular/angular/issues/5622

On Wednesday, February 10, 2016 at 8:00:48 PM UTC+1, Baptiste Legouix wrote:
>
> Hello,
>
> Why does Angular2 refuse this sort of behave, and what is the good 
> practice to make it work ?
>
> import {Injectable} from 'angular2/core';
> @Injectable()
> export class ServiceOne {
>     //
> }
>
>
>
>
>
> import {Injectable} from 'angular2/core';
> import {ServiceOne} from './one.service';
> @Injectable({
>     providers : [ServiceOne]
> })
> export class ServiceTwo {
>
>     constructor(serviceOne: ServiceOne) { }
>
>     //
> }
>
> It say me "Supplied parameters do not match any signature of call target". 
> I suppose it's due to the providers field in the parenthesis of 
> @Injectable, but this syntax seem natural in the extents it's the 
> @Component DI one.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to