Update for angular 1.2