TYPESCRIPT CODE:
helloworld(){
this.get_data().then(data => {
console.log(data);
});
}
get_data(){
return this.http.get('assets/data/user.json').map(res => res.json()).subscribe(data => {
return this.json_data = data;
});
}
Anyone can please tell me why then is not working. How can I resolve this? Sorry for my weak English.