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


TypeScript angularfire.FirebaseArray类代码示例

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


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

示例1: clearCompleted

 clearCompleted() {
     var toClear = {};
     this.todoService.list.forEach((todo) => {
         if(todo.completed) {
             toClear[todo._key] = null;
         }
     });
     this.todoService.bulkUpdate(toClear);
 }
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:9,代码来源:todo.ts

示例2: doneEditing

 doneEditing($event, todo) {
     var which = $event.which;
     var target = $event.target;
     if(which === 13) {
         todo.title = target.value;
         this.todoService.save(todo);
         this.todoEdit = null;
     } else if (which === 27) {
         this.todoEdit = null;
         target.value = todo.title;
     }
 }
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:12,代码来源:todo.ts

示例3: addTodo

    addTodo($event, newTodo){
        if($event.which === 13) {

            this.todoService.add({
                title: newTodo.value,
                completed: false
            });

            newTodo.value = '';

        }
    }
开发者ID:bellicose100xp,项目名称:ng2-todo,代码行数:12,代码来源:todo.ts

示例4: clearChecked

    clearChecked(){
        var toClear = {};

        this.todoService.list.forEach(todo => {
            if(todo.completed) {
                toClear[todo._key] = null;
            }
        });

        this.todoService.bulkUpdate(toClear);

        this.bulkCheckState = false;
    }
开发者ID:bellicose100xp,项目名称:ng2-todo,代码行数:13,代码来源:todo.ts

示例5:

 this.todoService.list.forEach((todo)=> {
     todo.completed = isComplete;
     this.todoService.save(todo);
 });
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:4,代码来源:todo.ts

示例6: deleteMe

 deleteMe(todo) {
     this.todoService.remove(todo);
 }
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:3,代码来源:todo.ts

示例7: completeMe

 completeMe(todo) {
     todo.completed = !todo.completed;
     this.todoService.save(todo);
 }
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:4,代码来源:todo.ts

示例8: addTodo

 addTodo(newTitle) {
     this.todoService.add({
         title: newTitle,
         completed: false
     });
 }
开发者ID:kevinhennessy,项目名称:AngularSpark,代码行数:6,代码来源:todo.ts

示例9: removeTodo

 removeTodo(todo){
     this.todoService.remove(todo);
 }
开发者ID:bellicose100xp,项目名称:ng2-todo,代码行数:3,代码来源:todo.ts

示例10: toggleCheck

 toggleCheck(todo){
     todo.completed = !todo.completed;
     this.todoService.save(todo);
 }
开发者ID:bellicose100xp,项目名称:ng2-todo,代码行数:4,代码来源:todo.ts


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