Slow-cookers are just a simple, easy way of keeping things warm.
So you'd switch the slow cooker on about 30 minutes in advance (empty, just to warm it up).
Then you'd cook your spaghetti (as normal, in a saucepan) till it's cooked. Then you'd pile the cooked spaghetti into the slow cooker with something to stop it drying out -- a splash of hot water, and/or olive oil, etc. Hot water will stop it going all claggy and stuck-together.
Then you'd put the lid on and let people serve themselves.