The firebase.messaging() function takes the Firebase app instance as an optional parameter.

To wire it up with AngularFire2, you could let AngularFire2perform the app initialization and create the Firebase app instance and could then inject the app instance (into a service, for example) and pass it to firebase.messaging() like this: