Skip to content

Instantly share code, notes, and snippets.

Created September 21, 2016 10:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
export class Menu {
constructor() {
// The constructor() should establish variables for the class. It's the place to inject dependencies or pull in data that you'll use later.
this.intro = "This is the menu for Carrie's.";
this.menuItems = [
slug: "moroccanrolls",
name: "Moroccan Rolls",
img: "",
imgSlice: "",
blurb: "Our signature, perennial appetizer is a tube of crispy phyllo dough filled with savory herbs and served with a creamy dill sauce. Each order comes with two.",
price: "3.95"
slug: "crepes",
name: "Vietnamese Crepes with Mushroom Filling",
img: "",
imgSlice: "",
blurb: "<h5>Gluten Free - Vegan</h5>A mung bean crepe wrapped around richly flavored mushroom filling and mung bean sprouts. Mildly spicy.",
price: "7.95"
activate(params, routeConfig) {
let i = 0;
while (i < this.menuItems.length) {
console.log(this.menuItems[i].slug + " is testing against " + params.item)
if (this.menuItems[i].slug === params.item) {
console.log("There's a match!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment