Angular 2: Property 'toPromise' does not exist on type 'Observable'

前端 未结 2 1878
北恋
北恋 2021-01-07 07:22

I\'m developing Angular 2 project and following Http Client Guide for implementing HTTP request But receiving following error when using RsJxmodule.

2条回答
  •  醉酒成梦
    2021-01-07 07:27

    Please check out : Angular 2 2.0.0-rc.1 Property 'map' does not exist on type 'Observable' not the same as issue report

    "For VS 2015 (Update 3):

    Install VS 2015 Update 3 Replace C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js with the file in https://raw.githubusercontent.com/Microsoft/TypeScript/Fix8518-U3/lib/typescriptServices.js. First take a local backup though."

    This workaround fixed the "Property 'toPromise' does not exist " issue for me.

提交回复
热议问题