Updated based on angular 1.2.0 rc3 changes