What is difference between injecting service through injector and through constructor in Angular?

后端 未结 0 1967
醉梦人生
醉梦人生 2020-11-30 08:26

what is the difference between these two:

1. constructor(private demoService: DemoService) { } 

    and

2. constructor(private injector:Injector){}
   
   p         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题