angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

Tree-shaking #1988

Closed paulstelzer closed 3 years ago

paulstelzer commented 5 years ago

Version info

Angular: 7.2.0

Firebase: 5.7.2

AngularFire: 5.1.1

How to reproduce these conditions

To use services (e.g. AngularFireStorage) you have to import the module (e.g. AngularFireStorageModule). Is there a reason why the service don't get the providedIn: 'root' property (e.g. here https://github.com/angular/angularfire2/blob/master/src/storage/storage.ts#L18)?

@Injectable({
  providedIn: 'root',
})

Expected behavior

Not to add AngularFireStorageModule (or AngularFireFunctionsModule) anymore

Actual behavior

We have to add AngularFireStorageModule for example inside the app.module.ts if there is a service which is providedIn root

jamesdaniels commented 3 years ago

Closing as outdated.