Gauge transformation and A-B effect