refactor angular-flash