Correct use of angular controller