-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
56 lines (48 loc) · 1.01 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Posts = new Meteor.Collection('posts');
var id = 0;
if(Meteor.isServer) {
Meteor.methods({
getData: function() {
return null;
}
});
}
if(Meteor.isClient) {
Template.main.events({
"click button": function() {
zone.addEvent('inside-button: ' + ++id);
// Meteor.call('getData', afterGetData);
Session.set('goo', true);
}
});
function afterGetData(err, data) {
setTimeout(function() {
Z = zone
var avg = data.total / data.count;
alert(avg);
}, 300);
}
Template.goo.rendered = function() {
G = zone;
throw new Error("Awesome Goo");
};
Template.main.canShowGoo = function() {
return Session.get('goo') === true;
}
var lc = 0;
Posts.find().observeChanges({
added: function(d) {
if(++lc >= 2) {
K = zone;
throw new Error('high');
}
}
});
Deps.autorun(function() {
var goo = Session.get('goo');
if(goo === true) {
DD = zone;
throw new Error('Goooo Deps');
}
});
}