Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 在Angular2 cli应用程序中使用GeoFire,该应用程序使用WebPack而不是System.config.js_Angularjs_Angular_Typescript_Angular Cli_Geofire - Fatal编程技术网

Angularjs 在Angular2 cli应用程序中使用GeoFire,该应用程序使用WebPack而不是System.config.js

Angularjs 在Angular2 cli应用程序中使用GeoFire,该应用程序使用WebPack而不是System.config.js,angularjs,angular,typescript,angular-cli,geofire,Angularjs,Angular,Typescript,Angular Cli,Geofire,我是typescript新手,面对这个问题,这个问题的答案在另一个问题中给出了完美的答案,但我不知道如何在web pack中做到这一点,因为为这个答案提供的解决方案是System.config.js,我的项目中没有它。 如果可以解决System.config.js部分的问题,这里是该问题的链接 遇到了相同的问题,并使用webpack expose loader解决了该问题: 首先将其添加到捆绑包(vendor.ts): 然后将其添加到webpack.config.js中的加载程序: modul

我是typescript新手,面对这个问题,这个问题的答案在另一个问题中给出了完美的答案,但我不知道如何在web pack中做到这一点,因为为这个答案提供的解决方案是System.config.js,我的项目中没有它。 如果可以解决System.config.js部分的问题,这里是该问题的链接


遇到了相同的问题,并使用webpack expose loader解决了该问题:

首先将其添加到捆绑包(vendor.ts):

然后将其添加到webpack.config.js中的加载程序:

module: {
  loaders: [
    { test: require.resolve('geofire'), loader: 'expose?GeoFire' }
  ]
}
最后,在您的组件中:

declare var GeoFire: any;

遇到了相同的问题,并使用webpack expose loader解决了该问题:

首先将其添加到捆绑包(vendor.ts):

然后将其添加到webpack.config.js中的加载程序:

module: {
  loaders: [
    { test: require.resolve('geofire'), loader: 'expose?GeoFire' }
  ]
}
最后,在您的组件中:

declare var GeoFire: any;