Figured out why function is not added properly. Need to figure out how to init after all of angular js executes. #3