Resonance occurs whenever the phase angle of the circuit is zero, The only way that f = 0 is if XL = XC
Note that tanϕ = XR where X = reactance and ϕ = angle of lead or lag.
therefore, tan ϕ = XL−XCR but at resonance XL=XC
tan ϕ = 0R = 0 and ϕ = tan−1 = 0º