I\'m converting a project to use angular cli and everything is working (once it\'s build) but i\'ve got a weird behaviour during build.
with ng serve
I
I had this issue after serving my app and resolved it by pressing Ctrl+s in a file that was not even in an edited/unsaved state. Now it compiles without the warning. However, to get it to compile the first time was something very odd.
Storing an object instance in a variable and setting that variable as my [lazyLoaded] route's data was unacceptable to the TS/NG compiler. However, instantiating the object directly on the route's data property was acceptable.
I'm well aware that none of the above makes any intuitive sense, whatsoever, but I hope this saves somebody the time it could take to find this on your own.