Tic tac toe with Angular JS and firebase