  We report on electrical gating of the charge-density-wave phases and current
in h-BN capped three-terminal 1T-TaS$_2$ heterostructure devices. It is
demonstrated that the application of a gate bias can shift the source-drain
current-voltage hysteresis associated with the transition between the nearly
commensurate and incommensurate charge-density wave phases. The evolution of
the hysteresis and the presence of abrupt spikes in the current while sweeping
the gate voltage suggest that the effect is electrical rather than
self-heating. We attribute the gating to an electric-field effect on the
commensurate charge-density-wave domains in the atomic planes near the gate
dielectric. The transition between the nearly commensurate and incommensurate
charge-density-wave phases can be induced by both the source-drain current and
the electrostatic gate. Since the charge-density-wave phases are persistent in
1T-TaS2 at room temperature, one can envision memory applications of such
devices when scaled down to the dimensions of individual commensurate domains
and few-atomic plane thicknesses.
