我遇到了一次又一次的bug,一次又一次的修复,直到这个我似乎不理解的地方。应用程序被编译,但主页为空,并出现错误:core.js:36236 Uncaught TypeError: Cannot read property 'id' of undefined at registerNgModuleType
数据服务
@Injectable({ -> some say it isnt needed but i ran into other issue...
providedIn: 'root'
})
export class DataServic
我在我的角度应用程序中使用ngx翻译。我在app.module.ts中导入并完成了所有工作:
import {HttpClientModule, HttpClient} from '@angular/common/http';
import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
export function HttpLoaderF
我看到很多人发布关于NullInjectorError: No provider for HttpClient!的问题,但我在我的Karma单元测试中得到了一个更具描述性的错误。我一直在与Javascript/Typescript、HTML和CSS/SCSS并行学习Angular,所以我的基础有点不稳定。我如何修复这个错误?对于那些说是因为OP忘记导入测试模块的人,我已经导入了测试模块。下面是我的测试文件的样子。当我注释掉html中的所有内容时,仍然会收到这个错误。此外,我还尝试将ApiService存根。 错误: NullInjectorError: R3InjectorError(Dyn
当我尝试'ionic cordova --prod build android‘时,我得到了这个错误: 错误:无法读取未定义的属性'getBufferedLength‘ ANDROID_HOME=/usr/local/Caskroom/android-sdk/4333796 (DEPRECATED)
Failed to run "javac -version", make sure that you have a JDK version 8 installed.
You can get it from the following location:
https
当我尝试执行ng build时,我得到一个错误消息: ERROR in node_modules/@angular/common/http/http.d.ts:81:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (@angular/common/http) which declares HttpClient has not been proce