This is my demo using angularjs, for creating a service file, and adding service to a controller.
I have two problems with my demo:
In my case, I was missing the name of the Angular application in the html file. For example, I had included this file to be start of my application code. I had assumed it was being ran, but it wasn't.
app.module.js
(function () {
'use strict';
angular
.module('app', [
// Other dependencies here...
])
;
})();
However, when I declared the app in the html I had this:
index.html
But to reference the Angular application by the name I used, I had to use:
index.html (Fixed)