Send $modal to the ready function