Error: Can't resolve 'rxjs/add/operator/map'

前端 未结 4 1430
甜味超标
甜味超标 2020-12-29 23:54

This is app.module.ts I have tried to done the Import of map in different project and it worked fine, but in this project it\'s not working.

            


        
4条回答
  •  猫巷女王i
    2020-12-30 00:16

    The newer versions of Angular does not support map. So you need to install it using the command prompt using the following command. First go the the project directory and use the command:

    npm install --save rxjs-compat
    

    Don't forget to import this:

    import 'rxjs/add/operator/map';
    

    Thanks!

提交回复
热议问题