Created
July 9, 2014 03:40
-
-
Save BrandesEric/36c2cffa6e032c37e7b6 to your computer and use it in GitHub Desktop.
Meteor + TrackJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This thing lives at /client/lib/compatibility | |
(function (){ | |
window._trackJs = { | |
token: "mytoken" | |
}; | |
// the entire tracker script here | |
})() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>trackjs-test</title> | |
</head> | |
<body> | |
{{> hello}} | |
</body> | |
<template name="hello"> | |
<h1>TrackJS Test</h1> | |
<input type="text" value="" /> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Meteor.isClient) { | |
Template.hello.greeting = function () { | |
return "Welcome to trackjs-test."; | |
}; | |
Template.hello.events({ | |
'keyup input[type="text"]' : function (){ | |
console.log("keyup"); | |
} | |
}); | |
} | |
if (Meteor.isServer) { | |
Meteor.startup(function () { | |
// code to run on server at startup | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment