Project

General

Profile

Feature #46030

mgr/dashboard: We should provide all services in root

Added by Tiago Melo 7 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
dashboard/UI
Target version:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

With the current approach of providing in a module it is still possible to create 2 instances of a service that is supposed to be a singleton.
We should use the suggested providedIn configuration:

Beginning with Angular 6.0, the preferred way to create a singleton service is to set providedIn to root on the service's @Injectable() decorator. This tells Angular to provide the service in the application root.

https://angular.io/guide/singleton-services

History

#1 Updated by Tiago Melo 7 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 35586

#2 Updated by Lenz Grimmer 7 months ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v16.0.0

Also available in: Atom PDF