Slice the ham into strips. Peel the onion and slice it finely. Cook the pasta in plenty of boiling salted water. Heat the oil in a saucepan and, mixing often, add the onion and fry it lightly until soft but not golden then add the chilli.Mix the ham strips, 3-4 tbsp of the pasta’s cooking water and the finely chopped parsley; at last season with a bit of salt and pepper. Drain the pasta al dente, pour it in the pan with the sauce and sautèe briefly then serve.