move regex flag to the param type
fix issue where angular might not be loaded