Skip to content

Instantly share code, notes, and snippets.

@thomastuts
Created March 24, 2015 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomastuts/6d6e867d5f21c2486a2c to your computer and use it in GitHub Desktop.
Save thomastuts/6d6e867d5f21c2486a2c to your computer and use it in GitHub Desktop.
'use strict';
angular
.module('test')
.factory('Animal', function () {
function Animal(name) {
this.name = name;
}
Animal.prototype.sayHello = function () {
console.log('Hello, my name is ' + this.name + '!');
}
return Animal;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment