美文网首页
Meteor Tracker Autorun and depen

Meteor Tracker Autorun and depen

作者: xqm_michael | 来源:发表于2016-07-18 15:22 被阅读67次

 Trackertracker-menual

Tracker.autorun 数据类型

Session variables

Database queries on Collections

Meteor.status

The ready() method on a subscription handle

Meteor.user

Meteor.userId

Meteor.loggingIn

ReactiveVar

ReactiveDict

定制自己的autorun

```javascript

myDep=newTracker.Dependency();

Tracker.autorun(function(comp){

     myDep.depend();

     console.log("Something has happened!");

});

```

在需要自动运行 autorun --> console.log("something has happened!")的地方调用myDep.changed();

zzz~~~

相关文章

网友评论

      本文标题:Meteor Tracker Autorun and depen

      本文链接:https://www.haomeiwen.com/subject/xcwpjttx.html