当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript AngularFirestoreCollection.doc方法代码示例

本文整理汇总了TypeScript中angularfire2/firestore.AngularFirestoreCollection.doc方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AngularFirestoreCollection.doc方法的具体用法?TypeScript AngularFirestoreCollection.doc怎么用?TypeScript AngularFirestoreCollection.doc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angularfire2/firestore.AngularFirestoreCollection的用法示例。


在下文中一共展示了AngularFirestoreCollection.doc方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: addPrestation

 addPrestation(item: Prestation): Promise<any> {
   const id = this.afs.createId();
   const prestation = { id, ...item };
   return this.itemsCollection.doc(id).set(prestation).catch((e) => {
     console.log(e);
   });
 }
开发者ID:ChristopheGueroult,项目名称:crm-init-bordeaux,代码行数:7,代码来源:prestation.service.ts

示例2: updatePrestation

 updatePrestation(item: Prestation, option?: StatePrestation): Promise<any> {
   const presta  = {...item};
   if (option) {
     presta.state = option;
   }
   return this.itemsCollection.doc(item.id).update(presta).catch((e) => {
     console.log(e);
   });
 }
开发者ID:ChristopheGueroult,项目名称:crm-init-bordeaux,代码行数:9,代码来源:prestation.service.ts

示例3: newCustomer

 newCustomer(customer: Customer, id: string){
   this.customersCollection.doc(id).set(customer);
 }
开发者ID:juan8831,项目名称:ultimate-restaurant,代码行数:3,代码来源:customer.service.ts

示例4: removeTodo

 removeTodo(id) {
   return this.todosCollection.doc(id).delete();
 }
开发者ID:DeCecco,项目名称:Proyect,代码行数:3,代码来源:todo.service.ts

示例5: updateTodo

 updateTodo(todo: Todo, id: string) {
   return this.todosCollection.doc(id).update(todo);
 }
开发者ID:DeCecco,项目名称:Proyect,代码行数:3,代码来源:todo.service.ts

示例6: getTodo

 getTodo(id) {
   return this.todosCollection.doc<Todo>(id).valueChanges();
 }
开发者ID:DeCecco,项目名称:Proyect,代码行数:3,代码来源:todo.service.ts

示例7: getHouse

 getHouse(id: string) {
   return this.housesCollection.doc(`${id}`).valueChanges();
 }
开发者ID:ChachaLim,项目名称:CIHouse,代码行数:3,代码来源:store.service.ts

示例8: create

 create(contact: ContactProfile): Promise<void> {
   const id = this.af.createId();
   contact._id = id;
   const data = JSON.parse(JSON.stringify(contact));
   return this.itemsCollection.doc(id).set(data);
 }
开发者ID:meumobi,项目名称:infomobi,代码行数:6,代码来源:contacts.service.ts

示例9: update

 update(contact: ContactProfile) {
   const id = contact._id;
   contact.modified = Date.now();
   const data = JSON.parse(JSON.stringify(contact));
   return this.itemsCollection.doc(id).update(data);
 }
开发者ID:meumobi,项目名称:infomobi,代码行数:6,代码来源:contacts.service.ts

示例10: update

 update(id: string, changes: any) {
   return this.itemsCollection.doc(id).update(changes);
 }
开发者ID:meumobi,项目名称:infomobi,代码行数:3,代码来源:comments.service.ts


注:本文中的angularfire2/firestore.AngularFirestoreCollection.doc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。