Best practices for provider injection in Angular [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












This question can be subjective but I'm wonder about proper way to use common dependency injection for few providers.
For example, I have provider with dependencies:



@Injectable()
export class PushManager {
constructor(public oneSignal: OneSignal,
private config: ConfigHelper, private http: Http)


And I'm using this provider to get oneSignal injection:



 this.pushManager.oneSignal.handleNotificationReceived()...


Is it common way to reuse injection or I just misunderstood conception?







share|improve this question











closed as off-topic by Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah Aug 1 at 18:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 1




    This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
    – Toby Speight
    Aug 1 at 17:02
















up vote
0
down vote

favorite












This question can be subjective but I'm wonder about proper way to use common dependency injection for few providers.
For example, I have provider with dependencies:



@Injectable()
export class PushManager {
constructor(public oneSignal: OneSignal,
private config: ConfigHelper, private http: Http)


And I'm using this provider to get oneSignal injection:



 this.pushManager.oneSignal.handleNotificationReceived()...


Is it common way to reuse injection or I just misunderstood conception?







share|improve this question











closed as off-topic by Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah Aug 1 at 18:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 1




    This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
    – Toby Speight
    Aug 1 at 17:02












up vote
0
down vote

favorite









up vote
0
down vote

favorite











This question can be subjective but I'm wonder about proper way to use common dependency injection for few providers.
For example, I have provider with dependencies:



@Injectable()
export class PushManager {
constructor(public oneSignal: OneSignal,
private config: ConfigHelper, private http: Http)


And I'm using this provider to get oneSignal injection:



 this.pushManager.oneSignal.handleNotificationReceived()...


Is it common way to reuse injection or I just misunderstood conception?







share|improve this question











This question can be subjective but I'm wonder about proper way to use common dependency injection for few providers.
For example, I have provider with dependencies:



@Injectable()
export class PushManager {
constructor(public oneSignal: OneSignal,
private config: ConfigHelper, private http: Http)


And I'm using this provider to get oneSignal injection:



 this.pushManager.oneSignal.handleNotificationReceived()...


Is it common way to reuse injection or I just misunderstood conception?









share|improve this question










share|improve this question




share|improve this question









asked Aug 1 at 16:07









Autumn_Cat

101




101




closed as off-topic by Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah Aug 1 at 18:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah Aug 1 at 18:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Toby Speight, yuri, Sam Onela, Stephen Rauch, Josiah
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 1




    This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
    – Toby Speight
    Aug 1 at 17:02












  • 1




    This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
    – Toby Speight
    Aug 1 at 17:02







1




1




This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
– Toby Speight
Aug 1 at 17:02




This question is incomplete. To help reviewers give you better answers, please add sufficient context to your question. The more you tell us about what your code does and what the purpose of doing that is, the easier it will be for reviewers to help you. The current title states your concerns about the code; it needs an edit to simply state the task; see How to get the best value out of Code Review: Asking Questions for guidance on writing good question titles.
– Toby Speight
Aug 1 at 17:02















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Greedy Best First Search implementation in Rust

Function to Return a JSON Like Objects Using VBA Collections and Arrays

C++11 CLH Lock Implementation