-
-
Save arnaudvalle/95079a790159c37f4cc800849d362767 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() | |
{ | |
'use strict'; | |
angular | |
.module('Services') | |
.service('MyService', MyService); | |
/* @ngInject */ | |
function MyService() | |
{ | |
var service = this; | |
// Private members | |
var _privateMember = 'example'; | |
// Public members | |
service.publicMember = 'example'; | |
// Public methods | |
service.publicMethod = publicMethod; | |
//////////////////////////////////// | |
/** | |
* Method description | |
* @param {string} param | |
* @return {string} | |
*/ | |
function publicMethod(param) | |
{ | |
_privateMember = param; | |
return _privateMember; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment