Skip to content

Instantly share code, notes, and snippets.

@palcisto
Last active April 15, 2016 17:53
Show Gist options
  • Save palcisto/ef8826dad5074a7dbd12 to your computer and use it in GitHub Desktop.
Save palcisto/ef8826dad5074a7dbd12 to your computer and use it in GitHub Desktop.
Angular Factory Boilerplate
(function() {
'use strict';
angular
.module('', [])
.factory('serviceName', serviceName);
serviceName.$inject = [];
function serviceName() {
let factory = {
square: square
};
function square(n) {
return n * n;
}
return factory;
}
})();
@palcisto
Copy link
Author

@vjwilson good I'll make these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment