Data Is Not Defined In Angular 6, If you call a function in ngOnInit that depends on data fetched asynchronously (e.