The Palestinian parliament has approved the government proposed by Hamas , clearing the way for the Islamic militant group to take office .