I would like to use the console.log inside the inline template but can\'t find any directions.
@Component({
selector:\"main\",
providers: [ItemService],
te
an easy way to debug is to create a pipe for that :
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'log'
})
export class LogPipe implements PipeTransform {
transform(value: any, args?: any): any {
console.log(value);
return null;
}
}
Then you just have to write this in the template :
{{ variable | log }}