Angular2 - Error: Can't resolve all parameters for IconService

前端 未结 6 906
南旧
南旧 2021-01-19 00:32

I\'ve been trying to switch my app over to AoT compilation and have been getting this error in the production environment when the app is loading (it works fine locally).

6条回答
  •  借酒劲吻你
    2021-01-19 00:50

    One possible cause of this error is if you are not decorating your IconService class with @Injectable(). If that is the cause, adding that decoration above the class declaration will fix the error.

提交回复
热议问题