How did the temple complex of Angkor Wat, initially a temple to the God Vishnu, transform into a Buddhist temple?

by silkenpoopy
silkenpoopy

Follow up question: Would there have been any resistance to this from the Hindu population or was the temple peacefully shared for a time period?