Example of percolation problem using angularjs