Book Image

Node.js Blueprints

By : Krasimir Stefanov Tsonev
Book Image

Node.js Blueprints

By: Krasimir Stefanov Tsonev

Overview of this book

Table of Contents (19 chapters)
Node.js Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Writing Ember.js


The client side of the project contains two screens. The first one displays an input field and a button where the user should type the Twitter handle. The second one shows the tweets. We can see this in the following screenshot:

The left part of the image shows the first page and the right one shows the tweets of the user.

Defining the templates

The html/page.html file is our main file and is the base of our application and will be the first page that the user sees. It contains the following code:

<!doctype html>
<html>
    <head>
        <title>Get Twitter Feed</title>
        <link rel="stylesheet" type="text/css" href="css/styles.css">
    </head>
    <body>

        <script src="js/jquery-1.10.2.js"></script>
        <script src="js/handlebars-1.1.2.js"></script>
        <script src="js/ember-1.3.1.js"></script>
        <script src="js/scripts.js"></script>
    </body>
...