Hi
@Jane62 and welcome to the forum.
The way I look at it, the answer to your question is maybe or maybe not. Depends on a lot of stuff.
First thing to think about is how much need to be done to get things under control. A good guide to this is the result of the HbA1c test used to give the diagnosis. A result above 48 gives a diabetes diagnosis but being a bit over 48 is a very different to being a long way over. The higher the number the more needs to be done. In this context, and in very simple terms, over 70 is high and over 100 is very high. If you don't know what the result was then ask your surgery for it.
Second thing to think about is carbohydrate in food. In principal carbohydrate turns into glucose in the gut, that glucose ends up in the blood and if the body for some reason struggles with processing it then you end up with high glucose levels and a diabetes diagnosis. You cannot stop eating carbohydrate altogether. It's everywhere and in everything. What you can do is control the amount of carbohydrate eaten so that less glucose is produced, ease the burden on your system in dealing with it, and bring you blood glucose down to levels which bring you out of the diabetic range.
If your husband is a just over the diagnosis limit then one way of going about things is to sit down with a note book and write down all the things consumed over the last week or so. Look up carbohydrate levels for all the items and get a rough idea of what his daily carbohydrate intake is. Don't try and be precise (its impossible), near enough will do. So for pasta, weigh out what would be a current portion, look up the carb content - its on the nutritional label on the packet - and work out how much is in your portion. Do the same for anything with flour, cereal, root veg, or sugar in it. Ignore dairy stuff, meat, fish and salads, its not worth the effort involved in including the small amounts of carb in that sort of stuff. When you have got that - it's likely to be around 250 g/day - think about reducing it by a decent amount. Set a target of say 150g/day and look at where you can lose 100 g/day without any real hardship. Could be eliminating things could be reducing portion sizes. Could be changing something like changing bread type to something with a lower carb content. No rules, do what suits you and your lifestyle. Do that and there is a good chance that when his HBa1c is next checked, it will be down and could even be sub diabetic.
If he is a long way over the diagnosis limit there is a good case for doing as Kaylz suggests and invest in a blood glucose monitor. By testing before and after eating you can get an almost instantaneous measure of the effect of individual food stuffs and use that to target things that give big rises in blood glucose. You can then target particular things rather than broadly looking at carbohydrate. This approach also helps because different thing affect different people differently. For example some tolerate oats, some don't, some are OK if they watch quantities. The only way to find out which category anybody is in is to test.
To come back to your question, can you eat pasta? Pasta is high carbohydrate so it is something to think about. Quite how you approach getting an answer depends very much on you and your lifestyle and what is most convenient for you. Might be easiest to eliminate it, might be easiest to reduce portion sizes, might be easiest to change spaghetti brands, might be easiest to look for other targets. Depends very much on you.
Hope that helps a bit with sorting out a plan.