Yaakov's Two Encounters with Angels

Why do the angels appear to Yaakov at the end of Parshat Vayetzei? Is there a connection between Yaakov encounter with angels at the beginning of the Parsha and his encounter at the end of the Parsha?