tylermcginnis / AngularServices

A repo that shows how to create the same AngularJS service using three different patterns, Service, Factory, and Provider.

Home Page:http://tylermcginnis.com/angularjs-factory-vs-service-vs-provider/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typo in provider config

tarunsapra opened this issue · comments

In the app.js there is a code snippet

app.config(function(myProviderProvider){
  //Providers are the only service you can pass into app.config
  myProviderProvider.thingFromConfig = 'This sentence was set in app.config. Providers are the only service that can be passed into config. Check out the code to see how it works';
});

Instead of myProviderProvider it should be only myProvider

I don't think you're right. NG appends 'Provider' to the end of your provider. And since the name of the provider is myProvider it becomes myProviderProvider. See Here