Activity-driven modeling has been recently proposed as an alternative growth mechanism for time varying networks, displaying power-law degree distribution in time-aggregated representation. This approach assumes memoryless agents developing random connections, thus leading to random networks that fail to reproduce two-nodes degree correlations and the high clustering coefficient widely observed in real social networks. In this work we introduce these missing topological features by accounting for memory effects on the dynamic evolution of time-aggregated networks. To this end, we propose an activity-driven network growth model including a triadic-closure step as main connectivity mechanism. We show that this mechanism provides some of the fundamental topological features expected for social networks. We derive analytical results and perform extensive numerical simulations in regimes with and without population growth. Finally, we present two cases of study, one comprising face-to-face encounters in a closed gathering, while the other one from an online social friendship network.