used to call back into angularjs from external libs