Hey guys,

I’m trying to decorate a provider and always run into Unknown provider: 
MockedServiceProvider <- MockedService while unit testing it with karma.

'use strict';

angular.module('MockedService', ['Service'])
    .config(function($provide) {
        $provide.decorator('Service', function($delegate) {
            return $delegate;
        });
    });

This service is used as a mocked variant of the real service communicating 
with web sockets.

Is there any mechanism to inherit from a provider, overwrite some methods 
or properties and extend it by new ones?

Thanks in advance.
Marco

-- 
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