port of the jquery memory game to angularjs