Hey there!

I'm trying to create my own service but it throws a 'null' error.

This is the plunker : http://plnkr.co/edit/3wiMfzMlYzszpCCMuzw1?p=preview 
(see the console)

In case that to you guys works magically I'm posting the error

No provider for MyService! (PlunkerApp -> MyService)

Error: null
    at NoBindingError.BaseException (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:7724:25)
    at NoBindingError.AbstractBindingError (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:9577:66)
    at new NoBindingError (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:9595:60)
    at Injector.execute.Injector._throwOrNull (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27722:21)
    at Injector.execute.Injector._getByKeyUnbounded (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27767:25)
    at Injector.execute.Injector._getByKey (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27715:27)
    at Injector.execute.Injector._getByDependency (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27703:27)
    at Injector.execute.Injector._new (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27601:38)
    at InjectorInlineStrategy.execute.InjectorInlineStrategy.instantiateBinding 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:27377:34)

    at 
ElementInjectorInlineStrategy.execute.ElementInjectorInlineStrategy.hydrate 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:28802:26)


That is pretty much what the documentation shows :
- https://angular.io/docs/js/latest/api/di/InjectableMetadata-class.html
- 
https://angular.io/docs/js/latest/api/annotations/DirectiveAnnotation-class.html

For what I can see in the documentation on angular2.d.ts it should be ok, 
and using @Inject(Service) svc: Service throws the same error. In the 
plunkr the error is what you can see above, on my computer is a little bit 
different (using @Inject(Service)...)

No provider for TypeDecorator! (MyComponent -> TypeDecorator) in [list_items 
in null]
STACKTRACE:
Error: No provider for TypeDecorator! (MyComponent -> TypeDecorator) in 
[list_items 
in null]
    at ChangeDetectionError.BaseException (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:7724:25)
    at new ChangeDetectionError (https:
//code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:8984:66)
    at AbstractChangeDetector.execute.AbstractChangeDetector.throwError (
https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20232:19)
    at 
AbstractChangeDetector.ChangeDetector_LazyScrollComponent_comp_0.detectChangesInRecords
 
(eval at <anonymous> 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:9896:20), 
<anonymous>:29:16)
    at AbstractChangeDetector.execute.AbstractChangeDetector._detectChanges 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20196:18)
    at 
AbstractChangeDetector.execute.AbstractChangeDetector._detectChangesInShadowDomChildren
 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20217:20)
    at AbstractChangeDetector.execute.AbstractChangeDetector._detectChanges 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20200:18)
    at 
AbstractChangeDetector.execute.AbstractChangeDetector._detectChangesInShadowDomChildren
 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20217:20)
    at AbstractChangeDetector.execute.AbstractChangeDetector._detectChanges 
(https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20200:18)
    at AbstractChangeDetector.execute.AbstractChangeDetector.detectChanges (
https://code.angularjs.org/2.0.0-alpha.32/angular2.dev.js:20188:18)


I've looked through angular's github, but I can not find anything relevant. 
Am I missing something?

Thanks in advance.

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to