An angle grinder, comprising: a housing formed with a handle; a clamping device for mounting a grinding disk; an output shaft for driving the clamping device to rotate; a brushless motor provided with a motor shaft; a transmission mechanism for transmitting power between the motor shaft and the output shaft; and a circuit board assembly for providing electricity to the brushless motor, an enclosing capsule for fixing the circuit board assembly in the housing and wherein the circuit board assembly comprises a circuit element for controlling the brushless motor and a circuit board for mounting the circuit element, the circuit element is connected electrically with the brushless motor, the circuit board is connected fixedly with the enclosing capsule, and the enclosing capsule is formed with an opening allowing the circuit element to be exposed thereof, wherein the clamping device is disposed outside of the housing and connected with the output shaft, the output shaft is at least partially disposed inside of the housing and connected with the transmission mechanism, the brushless motor is arranged between the transmission mechanism and the circuit board assembly in a direction substantially parallel to the motor shaft, and the motor shaft is disposed along a direction substantially perpendicular to the output shaft, characterized in that: the housing comprises a rear housing for containing a part of the circuit board assembly and the rear housing is formed with a side cooling window disposed opposite to the opening of the enclosing capsule, the housing further comprises a front housing for mounting the output shaft and a motor housing for containing the brushless motor and wherein the motor housing is arranged between the front housing and the rear housing, and the motor housing is provided with a supporting rib for supporting the enclosing capsule and a limiting structure for limiting a position of the enclosing capsule and the enclosing capsule is arranged between the supporting rib and the limiting structure. a housing formed with a handle; a clamping device for mounting a grinding disk; an output shaft for driving the clamping device to rotate; a brushless motor provided with a motor shaft; a transmission mechanism for transmitting power between the motor shaft and the output shaft; and a circuit board assembly for providing electricity to the brushless motor, an enclosing capsule for fixing the circuit board assembly in the housing and wherein the circuit board assembly comprises a circuit element for controlling the brushless motor and a circuit board for mounting the circuit element, the circuit element is connected electrically with the brushless motor, the circuit board is connected fixedly with the enclosing capsule, and the enclosing capsule is formed with an opening allowing the circuit element to be exposed thereof, wherein the clamping device is disposed outside of the housing and connected with the output shaft, the output shaft is at least partially disposed inside of the housing and connected with the transmission mechanism, the brushless motor is arranged between the transmission mechanism and the circuit board assembly in a direction substantially parallel to the motor shaft, and the motor shaft is disposed along a direction substantially perpendicular to the output shaft, characterized in that: the housing comprises a rear housing for containing a part of the circuit board assembly and the rear housing is formed with a side cooling window disposed opposite to the opening of the enclosing capsule, the housing further comprises a front housing for mounting the output shaft and a motor housing for containing the brushless motor and wherein the motor housing is arranged between the front housing and the rear housing, and the motor housing is provided with a supporting rib for supporting the enclosing capsule and a limiting structure for limiting a position of the enclosing capsule and the enclosing capsule is arranged between the supporting rib and the limiting structure. the housing comprises a rear housing for containing a part of the circuit board assembly and the rear housing is formed with a side cooling window disposed opposite to the opening of the enclosing capsule, the housing further comprises a front housing for mounting the output shaft and a motor housing for containing the brushless motor and wherein the motor housing is arranged between the front housing and the rear housing, and the motor housing is provided with a supporting rib for supporting the enclosing capsule and a limiting structure for limiting a position of the enclosing capsule and the enclosing capsule is arranged between the supporting rib and the limiting structure.