Page MenuHomeDevCentral

No OneTemporary

diff --git a/ship.css b/ship.css
new file mode 100644
index 0000000..b6b4052
--- /dev/null
+++ b/ship.css
@@ -0,0 +1 @@
+/* CSS declarations go here */
diff --git a/ship.html b/ship.html
new file mode 100644
index 0000000..aecb8ea
--- /dev/null
+++ b/ship.html
@@ -0,0 +1,14 @@
+<head>
+ <title>Nasqueron Ship</title>
+</head>
+
+<body>
+ <h1>Welcome to the Nasqueron Ship console.</h1>
+
+ {{> hello}}
+</body>
+
+<template name="hello">
+ <button>Click Me</button>
+ <p>You've pressed the button {{counter}} times.</p>
+</template>
diff --git a/ship.js b/ship.js
new file mode 100644
index 0000000..f8bee6b
--- /dev/null
+++ b/ship.js
@@ -0,0 +1,23 @@
+if (Meteor.isClient) {
+ // counter starts at 0
+ Session.setDefault("counter", 0);
+
+ Template.hello.helpers({
+ counter: function () {
+ return Session.get("counter");
+ }
+ });
+
+ Template.hello.events({
+ 'click button': function () {
+ // increment the counter when button is clicked
+ Session.set("counter", Session.get("counter") + 1);
+ }
+ });
+}
+
+if (Meteor.isServer) {
+ Meteor.startup(function () {
+ // code to run on server at startup
+ });
+}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 17:35 (9 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260654
Default Alt Text
(1 KB)

Event Timeline