title: How to create a singleton service in angular 5?
body: <p>I have a service called MessageService, I want to make it singleton.</p>
  
  <pre><code> @Injectable()
    export class MessageService {
    name: string ;
    constructor() { 
       this.name = "Marouen"; 
     }
  
  }
  </code></pre>
  
  <p>but I realize that every time the service is called from a component it create a new instance.</p>