I am getting the error in the title and here is the full stack trace, i am not sure what it is, any insight is welcomed!
browser_adapter.js:84 EXCEPTION: Error i
That's probably because of circular dependency in the object. In that case, it's not possible to stringify but it's always possible to log to browser console. So we can create a very basic pipe for this purpose.
in app.module.ts
:
import { LogPipe } from './log.pipe';
@NgModule({
declarations: [
//...
LogPipe,
],
})
export class AppModule {}
@Pipe({name: 'log'})
export class LogPipe implements PipeTransform {
public transform(value: object): void {
console.log(value);
return;
}
}
Then we can use the pipe for fast logging
{{'some text' | log}}