A bright radio burst was newly discovered in SGR 1935+2154, which exhibits some fast radio burst (FRB)-like temporal and frequency properties, suggesting a neutron star (NS)/magnetar magnetospheric origin of FRBs. We propose an explanation of the temporal and frequency properties of sub-pulses of repeating FRBs based on the generic geometry within the framework of charged-bunching coherent curvature radiation in the magnetosphere. The sub-pulses in a radio burst come from bunches of charged particles moving along different magnetic field lines. Their radiation beams sweep across the line of sight at different times, and those radiating at the more curved part tend to be seen earlier and at higher frequency. This structure of sub-pulses is a natural consequence of coherent curvature radiation from an NS/magnetar magnetosphere with suddenly and violently triggered sparks. We also investigate the magnetoionic environments of FRBs by deriving their estimated average magnetic field strengths along the line of sight in their host galaxies and comparing them with those of Galactic pulsars and magnetars. We find that for those FRBs with RM measurements, the magnetoionic environments are statistically consistent with those of both Galactic pulsars and magnetars. Galactic pulsars and magnetars close to the Galactic Centre have relatively larger magnetoionic environments than other pulsars/magnetars.