Placing confetti inside function and calling on controller