Created
March 24, 2015 12:44
-
-
Save thomastuts/6d6e867d5f21c2486a2c 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
'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