In a transformer, the primary has two components of current: -
- Magnetization current i.e. the open-secondary primary current.
- Current that (ignoring small leakage inductances) finds it way (via the turns ratio) to the secondary.
Point 1 - the phase angle of the mag current is 90 degree lagging the primary voltage (just like an inductor). In fact with the secondary open circuit, the transformer is just an inductor.
Point 2 - the current in the secondary is in phase with the secondary voltage for a purely resistive load. The power delivered to the load is "X" watts and the power taken from the supply via the perfect transformer is "X" watts.
Primary current is mainly\$^1\$ in phase with primary voltage when full load is on the secondary. As the secondary loading reduces, the primary current starts to look more reactive and eventually it is 90 degrees out of phase.
\$^1\$ As Dave tweed points out, for many low power transformers (on full load) the primary magnetizing current (at 90 degrees) is still quite domainant and therefore the phase angle won't be "mainly in phase with the primary voltage". The example he gives is a transformer with 1 henry primary mag inductance. This will take a reactive current of 120 V/ XL.
XL is about 377 ohms therefore, current is 318 mA. Current attributed to the 12V load is 1A and due to the turns ratio produces a current of 100mA in the primary. In other words the primary current at full-load, for this type of transformer, is still mainly reactive and closer to 90 degrees than zero.