Angular, promises, CRUD app