DeborahK / AngularF2BWebAPI

Files for the "Angular Front to Back With Web API" Pluralsight course by Deborah Kurata.
MIT License
124 stars 228 forks source link

Error: [$injector:unpr] Unknown provider: appSettingsProvider <- appSettings <- productResource #11

Closed MustVf333 closed 6 years ago

MustVf333 commented 7 years ago

I am having an issue with the above error. Following the course from the beginning and struck at CORS and Formatters.

portal7 commented 7 years ago

me too!

SagarManjunath commented 6 years ago

same issue here

DeborahK commented 6 years ago

This is most often caused by one of several things:

1) The angular.module is not defined appropriately.

(function () {
    "use strict";

    angular
        .module("common.services")
        .factory("productResource",
                ["$resource",
                 "appSettings",
                    productResource])
}());

2) You are missing the entry in the index.htm file.

    <!-- Services -->
    <script src="common/common.services.js"></script>
    <script src="common/productResource.js"></script>

3) There is a casing problem with productResource somewhere in the application. Ensure that all references to the service follow the same casing.