I have learned how to inject the needed service via component constructor like below:
that means within the scope of my component, I can use this.currentProductService to use the injected service.
However I am more curious about how the injected service is instantiated and passed into the constructor of my component, then I check the callstack in debugger:
question1
when I click the stack "MyOutletsComponent_Factory", the debugger directly navigates to line 19 and highlight it.
This makes me quite confused. Now what I see is still my-outlets.component.ts, but not so called "MyOutletsComponent_Factory". Where is the actual "MyOutletsComponent_Factory"?I cannot find it in chrome debugger.
Question 2
Then I check the outer stack, getNodeInjectable. I know it belongs to Angular core, but still I try to find currentProductService but failed.
I guess the l in lView means "logic", right? But how about "t" in tData? What's it meaning?
Since I cannot find my currentProductService instance in the code below, how is it technically passed as an argument into my component constructor?
value = lView[index] = factory.factory(undefined, tData, lView, tNode);
I know this question might not be related to Spartacus development, but just curious about the magic behind it...
I have learned how to inject the needed service via component constructor like below:
that means within the scope of my component, I can use this.currentProductService to use the injected service.
However I am more curious about how the injected service is instantiated and passed into the constructor of my component, then I check the callstack in debugger:
question1
when I click the stack "MyOutletsComponent_Factory", the debugger directly navigates to line 19 and highlight it.
This makes me quite confused. Now what I see is still my-outlets.component.ts, but not so called "MyOutletsComponent_Factory". Where is the actual "MyOutletsComponent_Factory"?I cannot find it in chrome debugger.
Question 2
Then I check the outer stack, getNodeInjectable. I know it belongs to Angular core, but still I try to find currentProductService but failed.
I guess the l in lView means "logic", right? But how about "t" in tData? What's it meaning?
Since I cannot find my currentProductService instance in the code below, how is it technically passed as an argument into my component constructor?
I know this question might not be related to Spartacus development, but just curious about the magic behind it...