Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Single-page Web Apps with Meteor

You're reading from   Building Single-page Web Apps with Meteor Build real-time single page apps at lightning speed using the most powerful full-stack JavaScript framework around

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781783988129
Length 198 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Fabian Vogelsteller Fabian Vogelsteller
Author Profile Icon Fabian Vogelsteller
Fabian Vogelsteller
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Getting Started with Meteor 2. Building HTML Templates FREE CHAPTER 3. Storing Data and Handling Collections 4. Controlling the Data Flow 5. Making Our App Versatile with Routing 6. Keeping States with Sessions 7. Users and Permissions 8. Security with the Allow and Deny Rules 9. Advanced Reactivity 10. Deploying Our App 11. Building Our Own Package 12. Testing in Meteor A. Appendix Index

Writing templates in Meteor

Normally when we build websites, we build the complete HTML on the server side. This was quite straightforward; every page is built on the server, then it is sent to the client, and at last JavaScript added some additional animation or dynamic behavior to it.

This is not so in single-page apps, where every page needs to be already in the client's browser so that it can be shown at will. Meteor solves this problem by providing templates that exists in JavaScript and can be placed in the DOM at some point. These templates can have nested templates, allowing for an easy way to reuse and structure an app's HTML layout.

Since Meteor is so flexible in terms of folder and file structure, any *.html page can contain a template and will be parsed during Meteor's build process. This allows us to put all templates in the my-meteor-blog/client/templates folder, which we created in the Chapter 1, Getting Started with Meteor. This folder structure is chosen as...

You have been reading a chapter from
Building Single-page Web Apps with Meteor
Published in: Jan 2015
Publisher:
ISBN-13: 9781783988129
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image