• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript angularfire2.AngularFire类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: constructor

 constructor(private _nav: NavController, private _af: AngularFire, private _navParams: NavParams) {
   this.charName = this._navParams.get('charName');
   this.charID = this._navParams.get('charID');
   this.dbURL = this._navParams.get('dbURL') + '/' + this.charID + '/sets';
   this.sets = this._af.list(this.dbURL);
   this.selSetFilter = 'incomplete';
 }
开发者ID:wjones0,项目名称:cow,代码行数:7,代码来源:sets.ts


示例2: constructor

 constructor(public af:AngularFire) {
   var ref = new Firebase(rootFirebase);
   ref.remove();
   this.questions = af.list('/questions');
   this.questions.add({question: 'why?'});
   this.questions.add({question: 'how?'});
 }
开发者ID:2947721120,项目名称:angularfire2,代码行数:7,代码来源:firebase_list_example.ts


示例3: constructor

 constructor(af: AngularFire, store: Store<AppState>) {
   af.list('/events').do(data => {
     store.dispatch({
       type: 'RECEIVED_FROM_EVENTS',
       payload: data,
     });
   }).subscribe();
 }
开发者ID:devsunited,项目名称:meetup,代码行数:8,代码来源:firebase-dispatcher.service.ts


示例4: constructor

 constructor(af:AngularFire) {
   this.people = af.list('/people')
     .map(people => {
       return people.map(person => {
         person.todos = af.list(`/todos/${person.$key}`)
         return person;
       });
     })
 }
开发者ID:jeffbcross,项目名称:plzwork,代码行数:9,代码来源:people.ts


示例5:

    af.auth.asObservable().filter(user => user !== null).subscribe(user => { // Skip null values
      this.boardURL = 'users/' + user.uid + '/boards/' + routeParams.get('key');
      this.board = af.object(this.boardURL);
      this.lists = af.list(this.boardURL + '/lists', { query: { orderByChild: 'priority' } });
      this.tasks = af.list(this.boardURL + '/tasks', { query: { orderByChild: 'priority' } });

      this.listObservable = af.list(this.boardURL + '/lists');
      this.taskObservable = af.list(this.boardURL + '/tasks');
    });
开发者ID:Denhai,项目名称:everyday-butter,代码行数:9,代码来源:board.component.ts


示例6:

 get focusPhases$(): Observable<FocusPhase[] | any[]> {
   if (this.authService.isLoggedIn()) {
     return this.angularFire.list(`/users/${this.authUser.uid}/focusPhases`);
   } else {
     return Observable.of([]);
   }
 }
开发者ID:supermarcos,项目名称:focus,代码行数:7,代码来源:data.service.ts


示例7:

 this._af.auth.subscribe((data) => {
     if (data) {
         this.userID = data.uid;
         this.dbURL = "/" + this.userID;
         this.characters = this._af.list(this.dbURL);
     } 
 })
开发者ID:wjones0,项目名称:cow,代码行数:7,代码来源:characters.ts


示例8: getAllWorkouts

 getAllWorkouts(callback = (workouts) => {}) {
   let sub = this.af.list("/workouts/").subscribe((workouts) => {
     sub.unsubscribe();
     callback(workouts);
     return;
   });
 }
开发者ID:baseballlover723,项目名称:angularattack2016-hairforce,代码行数:7,代码来源:workout.service.ts


示例9: getAllAssignments

 getAllAssignments(callback = (assignments) => {}) {
   let sub = this.af.list("/assignments/").subscribe((assignments) => {
     sub.unsubscribe();
     callback(assignments);
     return;
   });
 }
开发者ID:baseballlover723,项目名称:angularattack2016-hairforce,代码行数:7,代码来源:assignment.service.ts


示例10: Date

        this.af.auth.login({ email: this.rs.genEmail(phone), password: this.password }).then((authData) => {
            //console.log("Rs2:" + authData.uid);
            this.authData = authData;
            //localStorage.setItem('uid', authData.uid);
            this.rs.uid = authData.uid;
            var usersRef = this.af.object("/users/" + this.authData.uid);
            usersRef.update({
                lastlogin: (new Date()).toISOString()
            });

            usersRef.subscribe(res => {
                let role = res.role;
                this.rs.dealer = res.dealername;
                this.rs.role = res.role;
                this.rs.uid = res.uid;
                this.rs.ownerId = res.ownerid;
                this.rs.phone = res.phone;
                this.rs.fname = res.fname;
                this.rs.lname = res.lname;
                //console.log("role:" + role + " getRole:" + this.rs.role);

            }
            );

        }).catch((error) => {
开发者ID:davidrensh,项目名称:ng2autoService,代码行数:25,代码来源:AdminLogin.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript angularfire2.AngularFireAuth类代码示例发布时间:2022-05-25
下一篇:
TypeScript angularfire2.firebaseAuthConfig函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap