Sweden's parliament voted to approve caretaker prime minister Stefan Löfven to lead a new coalition government.