Fast radio bursts (FRBs) are millisecond-duration radio transients of unknown origin. Two possible mechanisms that could generate extremely coherent emission from FRBs invoke neutron star magnetospheres or relativistic shocks far from the central energy source. Detailed polarization observations may help us to understand the emission mechanism. However, the available FRB polarization data have been perplexing, because they show a host of polarimetric properties, including either a constant polarization angle during each burst for some repeaters or variable polarization angles in some other apparently one-off events. Here we report observations of 15 bursts from FRB 180301 and find various polarization angle swings in seven of them. The diversity of the polarization angle features of these bursts is consistent with a magnetospheric origin of the radio emission, and disfavours the radiation models invoking relativistic shocks.