Skip to content

Instantly share code, notes, and snippets.

@mandelbro
Last active September 16, 2016 17:07
Show Gist options
  • Save mandelbro/ea7849e82e85a9ee646a7b2de83cda74 to your computer and use it in GitHub Desktop.
Save mandelbro/ea7849e82e85a9ee646a7b2de83cda74 to your computer and use it in GitHub Desktop.
;(function ( app ) {
'use strict';
angular.module('PeachDelivery')
.factory("DeployService", DeployService);
DeployService.$inject = [];
function DeployService () {
// define the public facing api for this service
var service = {
'publicMethod' : publicMethod
};
return service;
// public methods
function publicMethod () {
// I can be called from other modules
// But only I can call the method below
privateMethod();
}
// private methods
function privateMethod () {
// I can only be called by functions in this service
}
}
})( window.app );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment