I have an angular 2 app generated by ng cli.
- When I run ng build (or) ng build --prod --aot=false and serve up the page things just work fine.
- But when I try to enable aot by running ng serve --aot=true and serve up, the page breaks with multiple DI errors like belowVery hard to debug. Any idea on how to debug these issues?
EXCEPTION: No provider for Options!
error_handler.js:59 ORIGINAL STACKTRACE:
ErrorHandler.handleError @ error_handler.js:59
(anonymous) @ application_ref.js:272
webpackJsonp.679.ZoneDelegate.invoke @ zone.js:229
onInvoke @ ng_zone.js:271
webpackJsonp.679.ZoneDelegate.invoke @ zone.js:228
webpackJsonp.679.Zone.run @ zone.js:113
(anonymous) @ zone.js:509
webpackJsonp.679.ZoneDelegate.invokeTask @ zone.js:262
onInvokeTask @ ng_zone.js:262
webpackJsonp.679.ZoneDelegate.invokeTask @ zone.js:261
webpackJsonp.679.Zone.runTask @ zone.js:151
drainMicroTaskQueue @ zone.js:405