generator-ngfs
Version:
Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node
26 lines (20 loc) • 496 B
JavaScript
module('<%= scriptAppName %>')
.provider('<%= cameledName %>', function () {
// Private variables
var salutation = 'Hello';
// Private constructor
function Greeter() {
this.greet = function () {
return salutation;
};
}
// Public API for configuration
this.setSalutation = function (s) {
salutation = s;
};
// Method for instantiating
this.$get = function () {
return new Greeter();
};
});
;
angular.