-
0 votesanswersviews
属性'push'在类型'Promise<any[]>'上不存在|异步
“属性'推''不存在于'IHero [] | Promise' . 属性'Promise'上不存在 为什么不呢?不是阵列吗? 在角度cli项目中使用Angular 4进行英雄之旅 . 我'm using the async pipe for the repeater instead of the official tutorial'的方法 . https://angular.io/docs/t... -
26 votesanswersviews
是否值得从Angular 2迁移到Angular 4?
您好SO社区和Angularians! 因此,我正在Angular 2中开发一个巨大的平台 . 我意识到Angular 2的许多外部库和依赖项正在迁移到新的Angular 4.很明显,给了我许多错误 . 我可以分叉这些库并使用分叉版本并订阅主库开发,或者我可以升级到Angular 4我的项目 . 要回答的问题是为了确定我是否值得迁移: Compatibility with Angular 2.4... -
3 votesanswersviews
RxJS Observables,何时取消?
我有几个关于Angular的问题 . 我最近开始尝试使用Angular并且真的无法掌握我应该取消订阅的时候,显然建议使用AsyncPipe,但在某些情况下无法使用它 . 如果我在服务中订阅HTTP请求,Observable是否取消订阅本身,或者它是否在应用程序生命周期内持续存在? 当我订阅(没有AsyncPipe)组件中的HTTP请求时,我可以在ngOnDestroy生命周期钩子中手动取消... -
2 votesanswersviews
单元测试没有ChangeDetectorRef的提供者
版本:Angular 4 . 我正在将子组件注入子组件以通过子组件访问父方法 . 在父组件中,我不得不使用ChangeDetectorRef,因为它有一个将更新运行时的属性 . 现在代码工作正常,但是子组件规范为“ChangeDetectorRef”抛出了错误,该错误是在父组件中注入的 . 错误:没有ChangeDetectorRef的提供者! 父组件 import { Component, ... -
3 votesanswersviews
将Angular 2升级到Angular 4没有导出成员'AnimationDriver'
我已将Angular 2升级为Angular 4.当我运行我的项目时,我面临以下错误 . node_modules / @ angular / platform-browser / platform-browser“'没有导出成员'AnimationDriver' . -
0 votesanswersviews
Angular(4)Firebase - Connect Domain - 已注册的域名@ domains.google.com
我正在使用firebase用于我的一个角度(4)应用程序 . 我现在正尝试通过连接到自定义域来在实际域上托管该站点 . 我已在Google Domains中注册了我的域名(https://domains.google.com) . 但现在我卡住了,不知道如何在Google Domains中添加此A记录 . 以下是我正在尝试的配置,知道做了一些错误 . 另外,我需要在“firebase.json”中...