Make it work with Angular 1.0+