當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。