bind (event, handler) {
		var self = this;
		if (event === 'newTodo') {
			$on(self.$newTodo, 'change', function () {
				handler(self.$newTodo.value);
			});
	
		} else if (event === 'removeCompleted') {
			$on(self.$clearCompleted, 'click', function () {
				handler();
			});
	
		} else if (event === 'toggleAll') {
			$on(self.$toggleAll, 'click', function () {
				handler({ completed: this.checked });
			});
	
		} else if (event === 'itemEdit') {
			$delegate(self.$todoList, 'li label', 'dblclick', function () {
				handler({ id: self._itemId(this) });
			});
	
		} else if (event === 'itemRemove') {
			$delegate(self.$todoList, '.destroy', 'click', function () {
				handler({ id: self._itemId(this) });
			});
	
		} else if (event === 'itemToggle') {
			$delegate(self.$todoList, '.toggle', 'click', function () {
				handler({
					id: self._itemId(this),
					completed: this.checked
				});
			});
	
		} else if (event === 'itemEditDone') {
			self._bindItemEditDone(handler);
	
		} else if (event === 'itemEditCancel') {
			self._bindItemEditCancel(handler);
		}
	}
/**
	 * Binds an event from a view to a handler
	 * @param {string} event The event triggered
	 * @param {function} handler The handler to bind to the event
	 */
Binds an event from a view to a handler
@param {string} event The event triggered
@param {function} handler The handler to bind to the event
Binds an event from a view to a handler @param { string } event The event triggered @param { function } handler The handler to bind to the event
bind (event, handler) {
		var self = this;
		if (event === 'newTodo') {
			$on(self.$newTodo, 'change', function () {
				handler(self.$newTodo.value);
			});
		} else if (event === 'removeCompleted') {
			$on(self.$clearCompleted, 'click', function () {
				handler();
			});
		} else if (event === 'toggleAll') {
			$on(self.$toggleAll, 'click', function () {
				handler({ completed: this.checked });
			});
		} else if (event === 'itemEdit') {
			$delegate(self.$todoList, 'li label', 'dblclick', function () {
				handler({ id: self._itemId(this) });
			});
		} else if (event === 'itemRemove') {
			$delegate(self.$todoList, '.destroy', 'click', function () {
				handler({ id: self._itemId(this) });
			});
		} else if (event === 'itemToggle') {
			$delegate(self.$todoList, '.toggle', 'click', function () {
				handler({
					id: self._itemId(this),
					completed: this.checked
				});
			});
		} else if (event === 'itemEditDone') {
			self._bindItemEditDone(handler);
		} else if (event === 'itemEditCancel') {
			self._bindItemEditCancel(handler);
		}
	}
bind ( event , handler ) { var self = this ; if ( event === 'newTodo' ) { $on ( self . $newTodo , 'change' , function ( ) { handler ( self . $newTodo . value ) ; } ) ; } else if ( event === 'removeCompleted' ) { $on ( self . $clearCompleted , 'click' , function ( ) { handler ( ) ; } ) ; } else if ( event === 'toggleAll' ) { $on ( self . $toggleAll , 'click' , function ( ) { handler ( { completed : this . checked } ) ; } ) ; } else if ( event === 'itemEdit' ) { $delegate ( self . $todoList , 'li label' , 'dblclick' , function ( ) { handler ( { id : self . _itemId ( this ) } ) ; } ) ; } else if ( event === 'itemRemove' ) { $delegate ( self . $todoList , '.destroy' , 'click' , function ( ) { handler ( { id : self . _itemId ( this ) } ) ; } ) ; } else if ( event === 'itemToggle' ) { $delegate ( self . $todoList , '.toggle' , 'click' , function ( ) { handler ( { id : self . _itemId ( this ) , completed : this . checked } ) ; } ) ; } else if ( event === 'itemEditDone' ) { self . _bindItemEditDone ( handler ) ; } else if ( event === 'itemEditCancel' ) { self . _bindItemEditCancel ( handler ) ; } }
Binds an event from a view to a handler
 @param {string} event The event triggered
 @param {function} handler The handler to bind to the event
Binds an event from a view to a handler @param { string } event The event triggered @param { function } handler The handler to bind to the event