src/openui5-todo-app/controller/Main.controller.js
/**
       * Delete all completed todo items.
       */
Delete all completed todo items.
Delete all completed todo items .
onClearCompletedTodos() {
        const oTodoModel = this.getView().getModel('todo')
        const aTodoItems = oTodoModel.getProperty('/items')
        const aNewTodoItems = aTodoItems.filter(
          oItem => oItem.isCompleted === false
        )
        oTodoModel.setProperty('/items', aNewTodoItems)
      }
onClearCompletedTodos ( ) { const oTodoModel = this . getView ( ) . getModel ( 'todo' ) const aTodoItems = oTodoModel . getProperty ( '/items' ) const aNewTodoItems = aTodoItems . filter ( oItem => oItem . isCompleted === false ) oTodoModel . setProperty ( '/items' , aNewTodoItems ) }
Delete all completed todo items.
Delete all completed todo items .
// remove deleted item from todo list // update todo model