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


TypeScript FirebaseObjectObservable.update方法代码示例

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


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

示例1: editClass

 editClass(classTObservable: FirebaseObjectObservable<IClassT>, classT: ClassT) {
   return classTObservable.update({
     name: classT.name,
     professor: classT.professor,
     timeSchedule: (classT.timeSchedule === undefined ? new HourDate() : classT.timeSchedule),
   });
 }
开发者ID:filipemendes1994,项目名称:FUTAdmin,代码行数:7,代码来源:classes.service.ts

示例2: update

 update( wordRef: FirebaseObjectObservable<any>, child:string, key:string, value:Object ) {
  wordRef.update(
     {[child]: {key: value}}
  )
  .then(_ => console.log("Update Size: OK"))
  .catch( e => console.log("Update Size: Fail"));
 }
开发者ID:edicon,项目名称:ng2Test,代码行数:7,代码来源:mdic-fire.service.ts

示例3: saveMovie

 saveMovie(movie: IMovie) {
     console.log(movie.movieId);
     // Have to always get the current data first?
     const item: FirebaseObjectObservable<IMovie> =
         this.af.database.object('movies/' + movie.movieId);
     return item.update({title: movie.title});
 }
开发者ID:DeborahK,项目名称:MovieHunter-Firebase,代码行数:7,代码来源:movie.service.ts

示例4:

 this.timerSubscription = timer.subscribe(t=>{
   if(t <= this.gameClock.duration){
     this.gameClock.ticks = t;
     this.firebaseServer.update({Timer:this.gameClock.duration-this.gameClock.ticks});
   } else {
     this.stopClock();
   }
 })
开发者ID:JacobDeming,项目名称:HotfixEngine,代码行数:8,代码来源:timer.component.ts

示例5: updateUser

 updateUser(user) {
     console.log("Propagating update back to fb",user);
     let key = user.$key;
     let value = user.$value;
     delete user.$key;
     delete user.$value;
     this.updatableUser.update(user);
     user.$key = key;
 }
开发者ID:edicon,项目名称:ames,代码行数:9,代码来源:auth.service.ts

示例6: readyToPlay

 readyToPlay(){
   this.ready=true;
   if(this.playersReady === 0){
     this.host = true;
   } else {
     this.host = false;
   }
   this.firebaseServer.update({Ready:this.playersReady+1});
 }
开发者ID:JacobDeming,项目名称:HotfixEngine,代码行数:9,代码来源:timer.component.ts

示例7: updateUser

 /**
  * Take a firebase user (with $key) and use angularfire to update
  */
 updateUser(user) {
     let key = user.$key;
     let value = user.$value;
     let exists = user.$exists
     delete user.$key;
     delete user.$value;
     delete user.$exists;
     this.updatableUser.update(user);
     user.$key = key;
     user.$exists = exists;
 }
开发者ID:chuckjaz,项目名称:ames,代码行数:14,代码来源:auth.service.ts

示例8: updateUser

  updateUser(id:number,first_name:string,last_name:string,email:string)
  {
    
    this.selectedUser.update({
      id:id,
      first_name:first_name,
      last_name:last_name,
      email:email

    });
    this._router.navigate(['']);
    
  }
开发者ID:OmerShemesh,项目名称:angularfire-test,代码行数:13,代码来源:userdetail.component.ts

示例9: playAgain

 playAgain(){
   this.ready=true;
   if(this.playersInfo.player1.playerClass=="Highwayman"){
     this.playersInfo.player1.currentHitpoints = 80;
   }
   if(this.playersInfo.player1.playerClass=="Elementalist"){
     this.playersInfo.player1.currentHitpoints = 50;
   }
   if(this.playersInfo.player1.playerClass=="Paragon"){
     this.playersInfo.player1.currentHitpoints = 100;
   }
   if(this.playersInfo.player2.playerClass=="Highwayman"){
     this.playersInfo.player2.currentHitpoints = 80;
   }
   if(this.playersInfo.player2.playerClass=="Elementalist"){
     this.playersInfo.player2.currentHitpoints = 50;
   }
   if(this.playersInfo.player2.playerClass=="Paragon"){
     this.playersInfo.player2.currentHitpoints = 100;
   }
   this.firebaseServer.update({Players:this.playersInfo});
   this.firebaseServer.update({Ready:this.playersReady+1});
 }
开发者ID:JacobDeming,项目名称:HotfixEngine,代码行数:23,代码来源:timer.component.ts


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