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


TypeScript FirebaseObjectObservable.set方法代码示例

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


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

示例1: listPlaces

	listPlaces(name, cat, add, lat, lng, placeID, uid, username ) {
  let places = this.af.database.object(`/goaf-list-places/${placeID}`);
  let thisgeo =  {  
                    latitude: lat  ,
                    longitude: lng 
                 };
  let openTime = {
      Monday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
       Tuesday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
        Wednesday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
        Thursday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
        Friday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
        Saturday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      },
        Sunday: {
        status: 'true',
        openTime: '09:00',
        closeTime: '17:00'
      }
  }
  return places.set({
            placeID: placeID,
            placeName: name,
            placeCat: cat,
            placeAdd: add,
            authorID: uid,
            author: username,
            rating: 0.5,
            website: "no_website",
            pPhone: "no_phone",
            openHours: openTime,
            geometry: thisgeo,
            listDate: firebase.database.ServerValue.TIMESTAMP
        });
	} 
开发者ID:ericel,项目名称:goaf,代码行数:58,代码来源:places.service.ts

示例2: setUserDetails

 setUserDetails(userData: UserData) {
   this.user = this.af.database.object('/users/' + userData.uid);
   this.user.set({
     name: userData.name,
     email: userData.email,
     type: userData.type
   });
   return this.user;
 }
开发者ID:sridharmane,项目名称:CleanSweepSite,代码行数:9,代码来源:data.service.ts

示例3: save

 save(name: string, race: string, nclass: string) {
   let nRace = this.races.find(x => x.id === race);
   let nClass = this.classes.find(x => x.id === nclass);
   this.character.set({ name: name, race: race, class: nclass, level: 1, experience: 1, base_life: 100, actual_life: 100,
     gold: 100, busy: new Date().getTime(), busy_place: "",
     strength: parseInt(nRace.strength) + parseInt(nClass.strength),
     intelligence: parseInt(nRace.intelligence) + parseInt(nClass.intelligence),
     agility: parseInt(nRace.agility) + parseInt(nClass.agility) });
   this.router.navigate(["/character"]);
 }
开发者ID:pacomar,项目名称:rolgame,代码行数:10,代码来源:create.component.ts

示例4: createProfile

 createProfile(myProfile: IProfile): Promise<any> {
   return this.profileItem$.set(myProfile);
 }
开发者ID:mukesh51,项目名称:vena,代码行数:3,代码来源:profile-service.ts

示例5: save

 save(newName: string) {
   this.item.set({ name: newName });
 }
开发者ID:DevKhater,项目名称:Angular2SandBox,代码行数:3,代码来源:app.component.ts

示例6: saveObject

 saveObject(newName: string) {
   this.itemObject.set({ name: newName });
 }
开发者ID:Gmannheim,项目名称:Angular2-Firebase,代码行数:3,代码来源:firebase-view.component.ts

示例7: save

 save(newName: string) {
     this.company.set({ name: newName });
 }
开发者ID:JacekKosciesza,项目名称:InvestSystemsOrg,代码行数:3,代码来源:company-detail.component.ts

示例8: add

  add(value: string){
    this.item.set({name: value}); 

  }
开发者ID:BismaTahir,项目名称:learn-angular2,代码行数:4,代码来源:app.component.ts

示例9: changeEnvironment

 changeEnvironment(x){
   var aether = 1;
   var material = 1;
   var chaos = 1;
   var order = 1;
   switch(x){
     case 'rain':
       if(this.environmentSnapshot.rain==true){
         this.onOff.update({rain:false});
         break;
       } else {
         this.onOff.update({rain:true});
         break;
       }
     case 'fog':
         if(this.environmentSnapshot.fog==true){
           this.onOff.update({fog:false})
           break;
         } else {
           this.onOff.update({fog:true});
           break;
         }
     case 'lightning':
       if(this.environmentSnapshot.lightning==true){
         this.onOff.update({lightning:false})
         break;
       } else {
         this.onOff.update({lightning:true});
         break;
       }
     case 'quake':
       if(this.environmentSnapshot.quake==true){
         this.onOff.update({quake:false})
         break;
       } else {
         this.onOff.update({quake:true});
         break;
       }
     case 'snow':
       if(this.environmentSnapshot.snow==true){
         this.onOff.update({snow:false})
         break;
       } else {
         this.onOff.update({snow:true});
         break;
       }
     case 'storm':
       if(this.environmentSnapshot.storm==true){
         this.onOff.update({storm:false})
         break;
       } else {
         this.onOff.update({storm:true});
         break;
       }
   }
   if (this.environmentSnapshot.rain == true) {
       chaos += 1;
       material += 2;
   }
   if (this.environmentSnapshot.fog == true) {
       aether += 2;
       order += 1;
   }
   if (this.environmentSnapshot.lightning == true) {
       aether += 1;
       chaos += 2;
   }
   if (this.environmentSnapshot.quake == true) {
       order += 2;
       material += 1;
   }
   if (this.environmentSnapshot.snow == true) {
       aether += 2;
       material += 2;
   }
   if (this.environmentSnapshot.storm == true) {
       order += 2;
       chaos += 2;
   }
 this.environment.set({aether:aether,material:material,chaos:chaos,order:order});
 this.changeChampionStats(aether,material,chaos,order);
 }
开发者ID:JacobDeming,项目名称:HotfixEngine,代码行数:82,代码来源:environment.component.ts

示例10: save

 save() {
   alert(JSON.stringify(this.u));
   this.user.set( this.u );
 }
开发者ID:mierze,项目名称:grouple-ng2,代码行数:4,代码来源:user-edit.ts


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