To demount the components firstly, you need to slacken the wheel lug nuts and the drive axle/hub nut and then lift the car via jack a place the car safely and surely on the jackstand before you actually demount the wheel. Fourth, unlock the bolt of the brake caliper and take the brake disc out, but do not disconnect the brake hose; fifth, disconnect the brake hose from the strut with the caliper hanging on a coil spring using a piece of wire. Take out the bolt that secures the wheel speed sensor and then, pull the sensor out from the steering knuckle. When you want to loosen the strut to steering knuckle nuts, bolts but don't remove them, paint around the strut to the steering knuckle. Disconnect the tie-rod end from the steering knuckle arm and proceed, to take away the balljoint-to-lower arm bolt/nuts. Remove the drive axle/hub nut using a spanner and push the drive axle from the hub as shown below; using a piece of wire, support its end. If the axle is out, it is easier to remove the 
Ball Joint with balljoint removal tool or a small puller but if the ball joint is fine, it does not have to be removed when replacing the hub. Take out the bolts associated with the strut to the knuckle and detach the steering knuckle from the strut assembly. For installation, in case if balljoint was removed from the old knuckle, screw the balljoint onto the new knuckle and tighten the nut of the balljoint stud and fit a new cotter pin. Put the knuckle and hub assembly into place and place the drive axle into the hub before pushing it into the strut flange, screw in the bolts and nuts but do not over tighten them. Screw the balljoint to the 
Control Arm without immersing the bolt and the nuts, and then screw the tie-rod to the steering knuckle arm and tighten the strut bolt nuts, the ball joint-to-control arm bolt and nuts and the tie rod nut. Embed the brake disc onto the hub and fix the caliper then fix and over tight the drive axle/hub nut. Last of all, put back the wheel and the lug nuts, lower the car, and then tighten the lug nuts to the recommended torque, additionally, one can check and adjust the front wheel alignment if needed after the job is done.