By using a detector that can measure which slit is taken by each electron, the interference pattern is destroyed. The intensity pattern observed is the sum of each individual electron passing through one of the slits, corresponding to two lines (equivalent to the classic case). Since there is no interference, or since there is only one possible path for each electron, I=|A1|^2+|A2|^2.