Use '@' instead of $attr so controller sees attr