UNPKG

generator-nww

Version:

Yeoman generator for NW.js, Angular, [Bootstrap+Jquery] and Node

32 lines (27 loc) 668 B
'use strict'; /** * @ngdoc service * @name <%= scriptAppName %>.<%= classedName %>Srv * @description * # <%= classedName %> * Provider in the <%= scriptAppName %> */ angular.module('<%= scriptAppName %>') .provider('<%= classedName %>', 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(); }; });