title: how to fix blank page NullInjectorError
body: <p><code>enter code here</code>after I put 'import {AngularFireDatabase} from '@angular/fire/database';' my page goes blank but there is no error at my visual studio as it can be compiled by ng serve but when I check at google console there is NullInjectorError</p>
  
  <p>here is my code</p>
  
  <p>user.service.ts</p>
  
  <pre><code>import { Injectable } from '@angular/core';
   import {AngularFireDatabase} from '@angular/fire/database';
  import * as firebase from 'firebase';
  
  
  @Injectable({
    providedIn: 'root'
  })
  
  export class UserService {
  
    constructor(private db: AngularFireDatabase) { }
  
  
  save(user: firebase.User) {
  this.db.object('/users/' + user.uid).update({
     name: user.displayName,
     email: user.email
   });
  }
  
  }
  </code></pre>