Fix "NotesController.$scope.addNote throws "TypeError: Cannot call method then of undefined".