本文整理汇总了TypeScript中meteor-rxjs.MongoObservable.Collection类的典型用法代码示例。如果您正苦于以下问题:TypeScript MongoObservable.Collection类的具体用法?TypeScript MongoObservable.Collection怎么用?TypeScript MongoObservable.Collection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MongoObservable.Collection类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: loggedIn
import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { Action } from '../models/action.model';
export const Activity = new MongoObservable.Collection<Action>('activity', {idGeneration: 'MONGO'});
function loggedIn() {
return !!Meteor.user();
}
Activity.allow({
insert: loggedIn,
update: loggedIn,
remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:activity.collection.ts
示例2: loggedIn
import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { Todo } from '../models/todo.model';
export const Todos = new MongoObservable.Collection<Todo>('todos', {idGeneration: 'MONGO'});
function loggedIn() {
return !!Meteor.user();
}
Todos.allow({
insert: loggedIn,
update: loggedIn,
remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:todos.collection.ts
示例3: loggedIn
import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { Entity } from '../models/entity.model';
export const Entities = new MongoObservable.Collection<Entity>('entities', {idGeneration: 'MONGO'});
function loggedIn() {
return !!Meteor.user();
}
Entities.allow({
insert: loggedIn,
update: loggedIn,
remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:entities.collection.ts
示例4: loggedIn
import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { Version } from '../models/version.model';
export const Versions = new MongoObservable.Collection<Version>('versions', {idGeneration: 'MONGO'});
function loggedIn() {
return !!Meteor.user();
}
Versions.allow({
insert: function (userId, doc) {
return true;
},
update: function (userId, doc) {
return true;
},
remove: function (userId, doc) {
return true;
}
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:22,代码来源:versions.collection.ts
示例5: loggedIn
import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { PipeUser } from '../models/user.model';
export const PipeUsers = new MongoObservable.Collection<PipeUser>('pipeUsers', {idGeneration: 'MONGO'});
function loggedIn() {
return !!Meteor.user();
}
PipeUsers.allow({
insert: loggedIn,
update: loggedIn,
remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:users.collection.ts
示例6: function
Meteor.publish('tasks.public', function() {
return Tasks.find({
$or: [
{ private: { $ne: true } },
{ owner: this.userId }
]
});
});
开发者ID:barbatus,项目名称:angular-meteor,代码行数:8,代码来源:tasks.ts
注:本文中的meteor-rxjs.MongoObservable.Collection类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论