Some of them say that by deflecting flaps,we take the chord that connects the leading edge with the trailing edge that is deflected down,so the aoa is increased (effective angle of attack).
Others say that we take as a reference the chord of the unflapped wing.So,due to the increased camber,we have a faster separation and the wing stalls at a smaller aoa.
What of these things happens?
The deployment of flap increases the camber of the wing, which increase the coefficients of lift and drag. A wing's resistance to flow separation is inversely proportional to the downward acceleration that it imparts to the oncoming air, therefore the greater the camber the lower the critical angle of attack.
Despite the flapped wing having a lower critical angle of attack than a clean wing, the flapped wing has a greater coefficient of lift at the critical (or indeed any) angle of attack than the clean wing.
It's worth remembering that the increase to the coefficient of lift that results from increasing the angle of attack is caused by the increased effective camber. As angle of attack increases, the stagnation point moves down the underside of the wing, thus reducing the length of its lower surface and increasing the length of its upper surface.