Which came first the Didache or the Gospels?

The Didache definitely has common material with the gospel of Matthew. The Didache presents this as the teaching of the apostles; Matthew presents this as the teaching of Jesus. Is this a significant difference? Surely the followers of Jesus would follow Jesus, and his teaching, if they are faithful. The Didache does say the teaching…