You can thank cheaper batteries.

Global sales of all-electric cars and plug-in hybrids hit a major milestone in 2017, surpassing 1 million units, according to research firm Navigant Research. Navigant also expects annual sales growth of 38 percent through 2020. That growth is largely due to cheaper batteries.

"Battery costs have shrunk dramatically in the last five years and promise to shrink further with the commercialization of solid-state batteries on the horizon," said Scott Shepard, a senior research analyst with Navigant. "In addition, increasing regulatory pressure in Europe and China may well push the PEV [plug-in electric vehicle] market to the aggressive end of the forecast regardless of oil prices."

Solid-state batteries are expected to offer better performance than the lithium-ion batteries used in today's electric cars. But while companies like Toyota, BMW, and Honda have discussed using solid-state batteries in future electric cars, the technology has not been successfully commercialized yet.

Check Out the BMW i8 Roadster

The Drive

Electric cars and plug-in hybrids still make up a small share of new-car sales, but that share has increased steadily over the past few years. According to Navigant, sales have experienced more than 40 percent annual growth since 2011, the year modern electric cars first became available in large numbers. The Nissan Leaf and Chevrolet Volt first went on sale in 2011; they were the first vehicles of their kind to be manufactured in large numbers at mass-market prices.

Going forward, Navigant believes the United States may be a weaker market for electric cars and plug-in hybrids than it has been over the past few years. Analysts are concerned that the Trump Administration will eliminate policies that support electric cars. At the same time, governments in other markets are getting more aggressive about promoting electric cars.

Several European countries have discussed ending sales of new gasoline and diesel cars within the next few decades. In 2019, China will introduce sales quotas for electric cars and plug-in hybrids. Stronger domestic support could allow European and Chinese automakers to leapfrog American firms in electric-car technology, Navigant argues. The Detroit Three won't be able to live off truck sales forever, in other words.