How did this Boeing 787 perform this near vertical takeoff?
First of all, it was nowhere near vertical. It is basically an optical illusion created by the camera angle.

Second, and most importantly, what you are seeing is the pitch angle and not angle of attack.

As it can be readily seen from the following image, the angle of attack and pitch angle can be significantly different.



Image from What is Angle of Attack? by Boeing

Angle of attack (AOA) is the angle between the oncoming air or relative wind and a reference line (usually fuselage centerline or longitudinal axis in commercial aircraft) on the airplane or wing.

Pitch angle (attitude) is the angle between the longitudinal axis (where the airplane is pointed) and the horizon. 

Flight path angle is the angle between the flight path vector (where the airplane is going) and the local atmosphere. In other words, it is the angle
between the flight path vector and the horizon, as far as a commercial airliner is concerned.

When referenced to the atmosphere, the angle of attack (AOA) is the difference between pitch angle and flight path angle. Depending on the aircraft atitude, they can be very different. During climb, usually the pitch is increased at constant angle of attack. 

For example, in a steep descent, an aircraft could reach very high angle of attack if the nose is below horizon. While flying upside down (not something that happens in an airliner, I might add) , both differ by around 180 $^{\circ}$.

So, the angle of attack in this takeoff is surely well below the stalling angle of 787.