Error: (SystemJS) Can't resolve all parameters for ActivatedRoute: (?, ?, ?, ?, ?, ?, ?, ?)

前端 未结 2 1956
情话喂你
情话喂你 2020-12-20 11:48

I\'m trying to inject ActivatedRoute component into my component to access the ID of the object I\'m editing (or to find out, there\'s no ID param, new object is created).

2条回答
  •  礼貌的吻别
    2020-12-20 12:17

    Remove providers: [ActivatedRoute] from @Component() there is no need for that. RouterModule.forRoot() already provides everything that is required.

提交回复
热议问题