Skip to content

Instantly share code, notes, and snippets.

@JeremyLikness
Created May 14, 2016 18:11
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 JeremyLikness/4064f27b72cffb6a8d21680d614fb74d to your computer and use it in GitHub Desktop.
Save JeremyLikness/4064f27b72cffb6a8d21680d614fb74d to your computer and use it in GitHub Desktop.
Quotes service
import {Injectable} from '@angular/core';
@Injectable()
export class QuotesService {
public quotes: string[] =
[
"This is a Hollywood square.",
"Pick me! Ooh, ooh, pick me!",
"Are you thinking hard?",
"Tap. Tap. Tap.",
"Row, row, row.",
"I'm trying to think!",
"Don't push too hard.",
"Be very, very careful.",
"I refuse to be punched.",
"I'm feeling off-key today.",
"Let's button this up.",
"I have a nervous tic.",
"This game is tac-key.",
"It was the best of tiles, it was the worst of tiles...",
"Sometimes things just seem to click.",
"I'm very square.",
"Watch out for tics."
]
constructor() {}
public getQuote(): string { return this.quotes.sort(() => 0.5 - Math.random())[0]; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment