In my Angular app I'm getting the error below only in aot build.
You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
and after debugging the ERROR saying is it's somewhere in the below codes
<ng-template #leftNavbar>
<cust-sidebar name="navbar"
[folded]="false"
lockedOpen="gt-md"
*ngIf="!conf.layout.navbar.hidden">
<navbar class="left-navbar" [ngClass]="conf.layout.navbar.background" layout="vertical"></navbar>
</cust-sidebar>
</ng-template>
and the ERROR also pointing to the the code below in ngOnInit
of cust-sidebar
this._custConfigService.config
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((config) => {
this._conf = config;
});
this is my config service code for getting and setting config
set config(value)
{
let config = this._configSubject.getValue();
config = _.merge({}, config, value);
this._configSubject.next(config);
}
get config(): any | Observable<any>
{
return this._configSubject.asObservable();
}
what's wrong with my code and why I'm only getting it in --aot build not in normal build.
He is saying that he was having two different version of CLI and after changing the CLI version it worked for him, I also have two different version of CLI but that is not a problem I think?