Angular momentum is a vector, with a magnitude and a direction.
For a general 3D shape rotating in space with rotational velocity vector $\boldsymbol{\omega}$, it is calculated by
$$ \boldsymbol{L} = \mathbf{I}\, \boldsymbol{\omega} $$
$$ \pmatrix{L_x \\ L_y \\ L_z} = \begin{bmatrix} I_{xx} & I_{xy} & I_{xz} \\ I_{xy} & I_{yy} & I_{yz} \\ I_{xz} & I_{yz} & I_{zz} \end{bmatrix} \pmatrix{ \omega_x \\ \omega_y \\ \omega_z } \tag{1}$$
where the 3×3 symmetric matrix $\mathbf{I}$ is the mass moment of inertia tensor expressed in the same orientation as $\boldsymbol{\omega}$.
Now to say that the (scalar) angular momentum is to be conserved along a particular direction, say $\boldsymbol{n}$ means that
$$ L_n = \boldsymbol{n} \cdot \boldsymbol{L} = n_x L_x + n_y L_y + n_z L_z = \text{(const)} \tag{2}$$
That is all there is to it. I assume the vector $\boldsymbol{n}$ is a unit vector above, in order to correctly project the momentum vector along the target direction and get its magnitude.
You can interpret the above as $L_n = \| \boldsymbol{L} \| \cos \theta$ where the angle $\theta$ is the angle between the $\boldsymbol{L}$ vector and the $\boldsymbol{n}$ vector.
The above value for angular momentum is only about the center of mass. To measure angular momentum about any other point you need a transformation law, just as you need a transformation law for velocities
$$ \boldsymbol{L}_A = \boldsymbol{L}_O + \boldsymbol{r}_{O/A} \times \boldsymbol{p} $$ where $\boldsymbol{p} = m \,\boldsymbol{v}_O$ is the linear momentum vector and $\boldsymbol{r}_{O/A}$ is the position of O relative to the reference point A. You interpret this as when you measure from any point away from the center of mass, angular momentum increases as the mass is further away.