Angular 2's Http service not exposing map() and other RxJS functions

前端 未结 5 699
[愿得一人]
[愿得一人] 2020-12-03 02:10

Does anybody know if there\'s been any breaking changes to the http between alpha 45 and alpha 48? I\'ve been searching around and I didn\'t find anything. My problem is tha

5条回答
  •  既然无缘
    2020-12-03 02:46

    In contrast to what what's written above, I found that I needed to use

        System.config({
            packages: {
                'app': {defaultExtension: 'js'},
                'node_modules': {defaultExtension: 'js'}
            },
            paths: {
                'rxjs/*' : 'node_modules/rxjs/*.js'
            }
        });
    

    The node_modules defaultExtension was the critical think for me (I dunno why the rxjs/* path doesn't add the .js but hey ho.)

    This works from 48 to the latest 52.

提交回复
热议问题