Flexible dependency injection for AngularJS