Created
August 30, 2016 15:36
-
-
Save matmkian/75a21185397a43e211e882b41108a0e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
il manque un return service; qqpart vers la fin je crois?