Generally we have that $$|\psi\rangle=\int_{all space} \psi(\mathbf x)|\mathbf x\rangle d^3\mathbf x$$ and therefore $\psi(\mathbf x)=\langle\mathbf x|\psi\rangle$.
When discussing the mutual eigenfunctions of the orbital angular momentum operators $L^2$ and $L_z$, we find that $\psi_{lm}(\mathbf x)=\langle r,\theta,\phi|l,m\rangle=R(r)Y_l^m(\theta,\phi)$ where the function $Y_l^m(\theta,\phi)$ is a spherical harmonic and $R(r)$ is some undetermined function of radial position which can only be found when we have more information about the system (so being in an eigenstate of one of these operators fixes only the angular part of the wavefunction).
Due to the fact we generally don't know $R(r)$, I have seen sources write that the angular part of the wavefunction of an eigenstate of these two operators is given by $\langle\theta,\phi|l,m\rangle=Y_l^m(\theta,\phi)$. However I am struggling to understand this notation. My thinking is that we could write $|r,\theta,\phi\rangle=|r\rangle|\theta,\phi\rangle$ because a definite position is just a combination of a definite radius with a definite solid angle. Then we would have $$|l,m\rangle=\int_{all space}\psi_{lm}(r,\theta,\phi)|r,\theta,\phi\rangle r^2drd\Omega$$$$=\int_{all space}R(r)Y_l^m(\theta,\phi)|r\rangle|\theta,\phi\rangle r^2drd\Omega$$$$=\int^\infty_{0}R(r)|r\rangle r^2dr\int_{allangles}Y_l^m(\theta,\phi)|\theta,\phi\rangle d\Omega$$ However, when acting with $\langle\theta,\phi|$ we do not get just $Y_l^m(\theta,\phi)$ as I would like: $$\langle\theta,\phi|l,m\rangle=Y_l^m(\theta,\phi)\int^\infty_{0}R(r)|r\rangle r^2dr$$ So what is the correct way to interpret this notation?