There are a lot of TODO tutorials out in the wild, and I'm certainly not going to write up another one. What we're going to build today is something altogether more exciting, something never before seen in the world of introductory tutorials. Wait for it... today we are going to build a DICE ROLLER.
Hopefully our Dice Roller is going to show a couple of the interesting Ember features in an application which does not require a server backend.
The first thing that needs to be done is to build an HTML file to serve the application. For starters, this is just a matter of building a basic HTML document with the jQuery, Emberand handlebars scripts included. Handlebars is a templating language which lets you write out data bound templates that are rendered into the browser.
Ember uses a lot of convention over configuration. This basically means that when it goes to a URL, it expects a number of objects to exist with very specific names. If it doesn't find these objects, it can often create default ones.
In this case when we load our application, Ember looks for a handlebars template calledapplication. This template is loaded for every url or request and wraps up and displays the entire application. For now, this template can be quite simple, but when you build a more complex application it can include things like menus, headers and footers.
Your new post is loading...