To compute slopes of tangent lines to a polar curve
$r=f(\theta)$, we treat it as a parametrized curve with $\theta=t$ and
$r=f(t)$. (Equivalently, we can use $\theta$ as our parameter). This
means that
$$x= r \cos(\theta) = f(t) \cos(t); \qquad y = r
\sin(\theta) = f(t) \sin(t).$$
Taking derivatives we get
$$dx/dt = -f(t)
\sin(t) + f'(t) \cos(t); \qquad dy/dt = f(t)\cos(t) + f'(t)
\sin(t).$$
That's enough information for us to compute $dy/dx$:
\begin{eqnarray*}\frac{dy}{dx} &=& \frac{dy/dt}{dx/dt} \cr &=&
\frac{f(t)\cos(t) + f'(t) \sin(t)}{-f(t) \sin(t) + f'(t) \cos(t)} \cr
&=& \frac{r \cos(\theta) + r' \sin(\theta)}{-r\sin(\theta) + r'
\cos(\theta)}, \end{eqnarray*} where $r'$ means $dr/d\theta$.
In the following video, we apply this method to compute $dy/dx$ as a
function of $\theta$ for a circle $r=2$ and for a
cardioid $r=1+\sin(\theta)$.