addItem(title){
        if (title.trim() === '') {
            return;
        }

        this.model.create(title, () => {
            this.view.render('clearNewTodo');
            this._filter(true);
        });
    }
/**
     * An event to fire whenever you want to add an item. Simply pass in the event
     * object and it'll handle the DOM insertion and saving of the new item.
     */
An event to fire whenever you want to add an item. Simply pass in the event
object and it'll handle the DOM insertion and saving of the new item.
An event to fire whenever you want to add an item . Simply pass in the event object and it ' ll handle the DOM insertion and saving of the new item .
addItem(title){
        if (title.trim() === '') {
            return;
        }
        this.model.create(title, () => {
            this.view.render('clearNewTodo');
            this._filter(true);
        });
    }
addItem ( title ) { if ( title . trim ( ) === '' ) { return ; } this . model . create ( title , ( ) => { this . view . render ( 'clearNewTodo' ) ; this . _filter ( true ) ; } ) ; }
An event to fire whenever you want to add an item.
An event to fire whenever you want to add an item .