1

Suppose I have an interface A and a class B implements A. Can I have provide(A, {useClass: B})?

For some reason it's giving me an error saying it cannot find name A even though it's imported. If I used A in a different context, like typing a variable in the same file it has no problems. Does provide explicitly require a class?

jz87
  • 9,199
  • 10
  • 37
  • 42
  • I replaced it with provide(forwardRef(() => A), {useClass: B}) but I get the same error. – jz87 Dec 12 '15 at 17:24
  • 2
    I looked around and found this one: http://stackoverflow.com/questions/32254952/binding-a-class-to-an-interface – jz87 Dec 12 '15 at 17:36

0 Answers0