Tic tac toe with AngulaJS and Firebase