Meteor-Angular에서 자동 실행이 있고 혼동 할 때마다 this.getReactively ('perPage') 변경하지만 Meteor.user()가 있는지 확인하기 전에 funtion autorun에 넣어야하지만 문제는이 자동 실행이 this.getReactively ('perPage')가 아니라 매번 실행된다는 것입니다. 유성이 변할 때. 사용자 변경, 나는 그것을 피할 수있는 방법이 있는지, 아마도 Meteor.user의 이전 값을 비교할 수 있는지, 나는 모른다. 누군가 나를 도울 수 있니? 감사합니다Meteor.user()가 Meteor.user()로 실행될 때마다 Meteor.user()가 실행되는 것을 방지하는 방법 Meteor.user 변경
Tracker.autorun(function() {
if(this.getReactively('perPage')){
if(Meteor.user()){
console.log(this.getReactively('perPage'));
Meteor.subscribe('notifications_bell',Meteor.user().notifications_bell,this.getReactively('perPage'));
}
}
}.bind(this));
왜 Meteor.user() 변경시 기능을 다시 실행하지 않으시겠습니까? 서브 스크립 션에서'Meteor.user(). notifications_bell'을 사용하고있는 것을 볼 수 있습니다. 서브 스크립 션이 변경되면 서브 스크립 션을 재실행해야합니다. – MatiK