2

I'm attempting to share a custom angularjs service with an angular component using UpgradeModule and am following the pattern in the Angular documentation. I am including the path to my "working" plunker code. I have commneted out the code that breaks the application in app.ts file so that we can see the hybrid app working until the point that I attempt to share the service with angular. I think it's complaining about my attempt to inject the service using the component facory method.

 export function sayHelloServiceFactory(i: string) {
  return i.get('sayHelloService');
}

export const sayHelloServiceProvider = {
  provide: SayHelloService,
  useFactory: sayHelloServiceFactory,
  deps: ['$injector']
};

angularJS / angular hybrid plunk here is the link to my plunk. please help.

J.Decker
  • 21
  • 2
  • I am able to downgrade an Angular service to work in an AngularJS component!!! so, must be because, I am bootstrapping the angular app first. – J.Decker Jul 20 '17 at 15:34

0 Answers0