The inductor is an ideal one, the phase difference is with respect to current, and the voltage varies by the law $V=V_Lsin(\omega t).$ One can prove that the current function will come out to be $I=I_Lsin(\omega t-\frac{\pi}{2}).$ It can also be proved that the phase difference b/w the functions wrt to the later function will be $\frac{T}{4}$ where $T$ is the fundamental period of the function $cos(\omega t).$ All books mention this (tough without giving proof). All books also mention that the phase difference is also $\frac{\pi}{2}.$ Some hint that they think this because there is $-\frac{\pi}{2}$ in the current function. But that's stupid.
If one accepts that both are phase difference then $\frac{T}{4}=\frac{\pi}{2}$ then $\omega=1.$ So $\frac{\pi}{2}$ will be phase difference only when $\omega=1.$ So it is clear that , in general, $\frac{\pi}{2}$ must not be phase difference; it is not true for $\omega=2.$
You can judge this graphically as well. As you move the slider for $w$ in this graph you will note that the phase difference changes and does not remain constant to $\frac{\pi}{2}.$
But again all the books have written that hence there should be mistake in my reasoning but where?