The paper aims to adopt the complex octonion to formulate the angular momentum, torque, and force etc in the electromagnetic and gravitational fields. Applying the octonionic representation enables one single definition of angular momentum (or torque, force) to combine some physics contents, which were considered to be independent of each other in the past. J. C. Maxwell used simultaneously two methods, the vector terminology and quaternion analysis, to depict the electromagnetic theory. It motivates the paper to introduce the quaternion space into the field theory, describing the physical feature of electromagnetic and gravitational fields. The spaces of electromagnetic field and of gravitational field can be chosen as the quaternion space...