Assumptions in a ideal transformer
In an ideal transformer, the winding is a pure inductor and this inductor does not have a DC component (i.e. zero winding resistance).

If you apply DC voltage (f = 0) to the windings, the reactance of the winding (inductor) will be zero due to \$X_L = 2 \pi \ f \ L\$ and thus the current will be infinite.

However, if you apply AC voltage (f ≠ 0), the source will see a non-zero reactance (again, \$X_L = 2 \pi \ f \ L\$) thus a finite-current of \$i_p = V_s / X_L\$ will flow through the winding.