Closed kdevunoori closed 5 years ago
There is a typo in the original productListCtrl.js. The typo is ProductListCtrl ...
angular
.module("productManagement")
.controller("ProductListCtrl",
ProductListCtrl);
ProductListCtrl should be productListCtrl
I assume from the above that this issue was resolved. I'm closing it. Thanks!
Can you please help me in resolving this issue? Please find the files attached for the code.
Index.html
<!DOCTYPE html>
app.js
var app = angular.module("productManagement", ["common.services"]);
common.services.js
angular .module("common.services", ["ngResource"]) .constant("appSettings", { serverPath: "http://localhost:52396/"
});
productListCtrl.js
angular .module("productManagement") .controller("ProductListCtrl", ["productResource", ProductListCtrl]);
productResource.js
angular .module("common.services") .factory("productResource", ["$resource", "appSettings", productResource])
function productResource($resource, appSettings) { return $resource(appSettings.serverPath + "/api/products/:id");
}