Angularjs Game of Life