本文整理汇总了TypeScript中meteor-rxjs.MeteorObservable.autorun方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MeteorObservable.autorun方法的具体用法?TypeScript MeteorObservable.autorun怎么用?TypeScript MeteorObservable.autorun使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类meteor-rxjs.MeteorObservable
的用法示例。
在下文中一共展示了MeteorObservable.autorun方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.versionSub = MeteorObservable.subscribe('versions', this.versionId).zone().subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.version = this._versionService.getVersionById(versionId);
this.nextVersion = this._versionService.getNextVersion(this.version.entity.entityId, this.version.version, this.version.taskType.type);
this.prevVersion = this._versionService.getPrevVersion(this.version.entity.entityId, this.version.version, this.version.taskType.type);
});
});
示例2: subscribeUsers
subscribeUsers(): Subscription {
// Fetch all users matching search pattern
const subscription = MeteorObservable.subscribe('users', this.searchPattern.getValue());
const autorun = MeteorObservable.autorun();
return Observable.merge(subscription, autorun).subscribe(() => {
this.users = this.findUsers();
});
}
示例3: setTimeout
Meteor.startup(() => {
const subscription = MeteorObservable.autorun().subscribe(() => {
if (Meteor.loggingIn()) {
return;
}
setTimeout(() => subscription.unsubscribe());
platformBrowserDynamic().bootstrapModule(AppModule);
});
});
示例4:
this.entitySub = MeteorObservable.subscribe('entity', this.entityId).zone().subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.entity = this._entityService.getEntityById(this.entityId);
});
});
示例5:
this.trackSub = MeteorObservable.subscribe('track', this.trackId).subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.track = Tracks.findOne(this.trackId);
this.getUsers(this.track);
});
});
示例6:
this.usersSub = MeteorObservable.subscribe('pipeUsers').subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.users = this._userService.findUsers();
});
});
示例7:
MeteorObservable.subscribe('users').subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.users = this.findUsers().zone();
});
});