Conway's Game of Life implementation using AngularJs and canvas