Meteor Module
Meteor Module
INF1802
Profa. Melissa Lemos
Outline Module 1
Web concepts with Meteor
Install Meteor, Generate starter application, Run it, Look at the files
Templates
Editing a template
Sending data to templates with helpers
Responding to user actions
Using Bootstrap
Reference
Meteor
https://www.meteor.com/
http://guide.meteor.com/
CLIENT
SERVER
Meteor
Meteor is a full-stack JavaScript platform for developing modern web and
mobile applications. Meteor includes a key set of technologies for building
connected-client reactive applications, a build tool, and a curated set of
packages from the Node.js and general JavaScript community.
From www.meteor.com
3 Templates
Create
Template
The template element is used to declare fragments of HTML that can be
cloned and inserted in the document by script. *
Templates provide a method for declaring inert DOM subtrees and manipulating
them to instantiate document fragments with identical contents.
When web pages dynamically alter the contents of their documents (e.g. in
response to user interaction or new data arriving from the server), it is common
that they require fragments of HTML which may require further modification
before use, such as the insertion of values appropriate for the usage context.
The template element allows for the declaration of document fragments which
are unused by the document when loaded, but are parsed as HTML and are
available at runtime for use by the web page.
4 Templates
Sending data to Templates with
Helpers
Send some data in from the Javascript layer into the template
Template helpers provide data for templates
Array of images
5 Using Bootstrap
Alert Function
If you want to do something on the server (as something in the database) after they click on an image,
I cant do that because its all happening inside the browser.
I dont have access that event inside my Meteor system.
Console
Look at the target
** Try to insert a field with a link to an URL (ex. Each animal has a link
to wikipedia)