I have added a few labels to a diagram given in the solution to this problem.

The prism has three forces acting on it, a normal force and a frictional force at the point of contact, and a gravitational force, $mg$.
Finding the angular momentum about a point of contact means that only the torque due to the gravitational force needs to be considered being the only external torque about a point of contact, $\tau$, acting on the prism.
The motion described has the prism rotating about $A$ followed by a rotation about $B$.
During the time of transition from rotation about $A$ to rotation about $B$, $\Delta t$, an impulsive torque $\int_0^{\Delta t} \tau\,\mathrm{d}t$ acts on the prism.
This impulsive torque can be neglected on the assumption that $\Delta t \to 0$, i.e., the transition, $v_{\rm A}$ to $v_{\rm B}$, occurs (almost) instantaneously, and if that is the case then angular momentum is conserved about any position on the slope.
All well and good?
However, you might consider doing the analysis by looking at the change in angular momentum about the centre of mass $C$.
That change in angular momentum is effected by an external torque due to the contact forces on the prism due to the slope.
Why does the impulsive torque due to those contact forces have an effect on the angular momentum whereas the impulsive torque due to gravitational attraction in the previous analysis could be neglected?
And the answer is a matter of scale in that the contact forces during this phase of the motion are much greater than the gravitational force.
In the real world the gravitational force does contribute to an impulsive torque as there is a finite transition time but that impulsive torque is very much smaller than the contact forces impulsive torques.
Related to this is the answer to the question, Can linear momentum be conserved before and after collision in the presence of an external force?.