Use angular internal functions instead of own globals