Hello I am using Angular2 and wanted to fetch the server and get some values for each ID I get inside ngFor.
Doesn't sound very good , however , the simplest way :
here call a function that do something with 'item' and return something new
Proper way :
@Directive({
selector: '[runDummyFunc]'
})
export class runDummyFunc {
constructor() {}
ngOnInit() {
this.runDummyFunc()
}
}
here call a function that do something with 'item' and return something new
In your class :
myFunction = ():void=>{
console.log('whatever');
}