This was my very first AngularJS app! When Richerd gave Mack 24 hours of ‘I’ll hack together anything you want”, Mack came up with this trivia game based on elephants. All the questions refer to elephants, such as “How many elephants tall is the Eiffel Tower?” The user answers by using a slider to guess the number. Since Richerd built the iOS app, I thought I would build a desktop version for fun!
It was fun looking up elephant facts! I didn’t have the question database so I made up a few of my own questions. I put all the questions into an array. Each array was an object with a question, answer, a min range value, and a max range value. It was a big change using Angular controllers and directives. Even at Trippeo, the desktop app was built without a front-end framework so it was an adjustment from manipulating DOM elements with jQuery.
After building this trivia game, the opportunity came up to create a page with many DOM elements generated from a database. I chose to do the website in Angular to try out some of my newly learned skills. The site is not yet public, but… I wrote production AngularJS code! Very exciting. I hope to be able to share that site here soon.
Page 62 – How Many Elephants