angular 2 template use console.log

You can’t access globals, statics, …

You can only access properties of the component the view belongs to.

You can add a

log(val) { console.log(val); }

to your component and use it like

{{log(item)}} 

but be prepared this to be logged quite often (every time change detection runs).

For debugging I prefer

 {{item | json}} 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)