當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript firestore-types.DocumentReference類代碼示例

本文整理匯總了TypeScript中@firebase/firestore-types.DocumentReference的典型用法代碼示例。如果您正苦於以下問題:TypeScript DocumentReference類的具體用法?TypeScript DocumentReference怎麽用?TypeScript DocumentReference使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DocumentReference類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: Program

 program(id: string) {
   return new Program(
     this,
     this.ref.collection("programs").doc(id),
     this.ref.collection("subprograms")
   );
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:7,代碼來源:institution.ts

示例2: Program

 extension(id: string): Program {
   return new Program(
     this.institution,
     this.ref.collection("extensions").doc(id),
     this.subprogramsRef
   );
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:7,代碼來源:program.ts

示例3: delete

 delete(): Promise<void> {
   return this.ref.delete();
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:watch.ts

示例4: sequences

 get sequences(): Observable<string[]> {
   return publishIndex(this.ref.collection("sequences"));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例5: Sequence

 sequence(id: string) {
   return new Sequence(this.ref.collection("sequences").doc(id));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例6: Course

 course(id: string) {
   return new Course(this, this.ref.collection("courses").doc(id));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例7: watches

 get watches(): Observable<string[]> {
   return publishIndex(this.ref.collection("watches"));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例8: Watch

 watch(id: string) {
   return new Watch(this.ref.collection("watches").doc(id));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例9: programs

 get programs(): Observable<string[]> {
   return publishIndex(this.ref.collection("programs"));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:institution.ts

示例10: Term

 term(id: string) {
   return new Term(this.ref.collection("terms").doc(id));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:course.ts

示例11: extensions

 get extensions(): Observable<string[]> {
   return publishIndex(this.ref.collection("extensions"));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:program.ts

示例12: Section

 section(id: string) {
   return new Section(this.ref.collection("sections").doc(id));
 }
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:3,代碼來源:term.ts

示例13:

 const observable = Observable.create(observer =>
   ref.onSnapshot(observer)
開發者ID:kevmo314,項目名稱:canigraduate.uchicago.edu,代碼行數:2,代碼來源:publishDocument.ts

示例14: associateQuery

 /**
  * Create a reference to a sub-collection given a path and an optional query
  * function.
  * @param path
  * @param queryFn
  */
 collection<T>(path: string, queryFn?: QueryFn): AngularFirestoreCollection<T> {
   const collectionRef = this.ref.collection(path);
   const { ref, query } = associateQuery(collectionRef, queryFn);
   return new AngularFirestoreCollection<T>(ref, query, this.afs);
 }
開發者ID:acipher,項目名稱:angularfire2,代碼行數:11,代碼來源:document.ts

示例15: update

 /**
  * Update some fields of a document without overwriting the entire document.
  * @param data
  */
 update(data: Partial<T>): Promise<void> {
   return this.ref.update(data);
 }
開發者ID:acipher,項目名稱:angularfire2,代碼行數:7,代碼來源:document.ts


注:本文中的@firebase/firestore-types.DocumentReference類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。