A Singleton Service
is one which has only one instance shared across the entire Angular App, it is
a great way to share data across different components even if they don’t have
any Hierarchal relationship. Services can be declared Singleton by setting the providedIn property of the @Injectable() to "root", when
creating the service.
@Injectable({
providedIn: 'root',
})
@Injectable({
providedIn: 'root',
})