British MPs have voted to play a bigger role in Brexit, giving themselves the power to express their preference for different options in an unprecedented move that the government called "dangerous".