I Have Tried
http.get('http://192.168.0.26:9000/api/task/counttask?projectid=-1&Teamid=-1&RoleId=-1&status=1&PID=-1&mytasks=0&alltasks=0&page=1&row=15&priorityid=-1&typeid=-1&taskname=&JSON&_=1471520478215')
.map((res: Response) => res.json())
.subscribe(res => this.result = res);
alert(this.result);
I am Getting Error But if You run this below Url in Browser it will give you the output
192.168.0.26:9000/api/task/counttask?projectid=-1&Teamid=-1&RoleId=-1&status=1&PID=-1&mytasks=0&alltasks=0&page=1&row=15&priorityid=-1&typeid=-1&taskname=&JSON&_=1471520478215
How to Handle this Request ??
map
function, it shouldn't be.map((res) => res.json())
? – Qianyue Aug 19 at 8:22(res: Response) => res.json()
is not correct in syntax. I think that it should beres => res.json()
– Qianyue Aug 19 at 8:26(res: Response) => res.json()
is totally fine and won't make any difference in the produced JavaScript – j2L4e Aug 19 at 8:27