2013-01-06 2 views

답변

17

변경 일부 세션 값이하지 않는 것, 그리고 단지 템플릿을 듣고있다 그 변화 :

<template name="body"> 
    {{touch}} 
</template> 

Template.body.touch = function() { 
    return Session.get("touch"); 
} 

Meteor.startup(function() { 
    $(window).resize(function(evt) { 
    Session.set("touch", new Date()); 
    }); 
}); 
+0

* 그 * 완전히 영리 나는 그것이 시도해 끝나요 : 초당 한 번 – AbigailW

+3

날짜에만 업데이트됩니다.!. 필요하다면 더 반응하는 접근법이있다. Session.set ("touch", $ (window) .width() + $ (window) .height()); –

관련 문제