fix crash when angular is not defined