sstorie / experiments

A repository to capture simple code experiments
140 stars 205 forks source link

service register issue angular2 rc5 { provide: 'channel.config', useValue: channelConfig }, #20

Closed amjadDev closed 7 years ago

amjadDev commented 7 years ago

ERROR in Error encountered resolving symbol values statically. Calling function 'ChannelConfig', function calls are not supported. Consider replacing the functi on or lambda with a reference to an exported function, resolving symbol AppModul e in mypth/src/app/app.module.ts, resolving symbol AppModule in mypth/app/app.modu le.ts

sstorie commented 7 years ago

Are you trying to do an AOT build? I don't have examples handy, but the tutorial was written before AOT was really flushed out, so you need to change how the libraries are provided. If you search for that error you'll find many examples, but here's one from SO that I found:

https://stackoverflow.com/q/42998892/571237

sstorie commented 7 years ago

Closing since no new information has been provided.