The Rossoneri won the game 1-0 following a first-half goal by Swedish star Zlatan Ibrahimovic.
“I liked the attitude of the side as we played great football, and deserved to win,” Allegri told Sky Sport after the game.
“It is a good win because it was an away win, firstly, and also because it was a derby.
“These victories can only serve you well.
“We could have scored a second goal at one stage, and it is a shame we were unable to. We fought hard for the ball, and this is fundamental for allowing the side to push high up the pitch.”