The Law of Conservation of Momentum applies in two and three dimensions, too. To apply it in 2-D, split the momentum into x and y components and keep them separate. Write out two conservation of momentum equations, one for the x direction and one for the y direction.
For instance:
m1v1ix + m2v2ix = m1v1fx + m2v2fx