templates/javascript/service/provider.js
'use strict';
angular.module('<%= scriptAppName %>')
.provider('<%= cameledName %>', function () {
// Private variables
var salutation = 'Hello';
// Private constructor
function Greeter() {
this.greet = function () {
return salutation;
};
}
// Configuration API
this.setSalutation = function (s) {
salutation = s;
};
this.$get = function () {
return new Greeter();
};
});