Skip to content

Instantly share code, notes, and snippets.

@BrianGenisio
Last active October 12, 2023 16:28
Show Gist options
  • Save BrianGenisio/7964192 to your computer and use it in GitHub Desktop.
Save BrianGenisio/7964192 to your computer and use it in GitHub Desktop.
App.factory('rickAstley', function() {
var messages = [
'Never gonna give you up',
'Never gonna let you down',
'Never gonna run around and desert you',
'Never gonna make you cry',
'Never gonna say goodbye',
'Never gonna tell a lie and hurt you'
];
return {
get: function() {
return {
count: 0,
next: function() {
return messages[this.count++ % messages.length];
}
}
}
};
});
@mike-ward
Copy link

Never gonna use this code (without you)

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