我遇到了一次又一次的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
我使用Module将一个应用程序迁移到MFE体系结构,并在运行时抛出了神秘的错误:
You provided an invalid object where a stream was expected error. You can provide an Observable, Promise, Array, or Iterable。
导致它的代码如下所示:
this
.getSomeObservable()
.pipe(
switchMap(() => this.getOtherObservable()) // switching here causes the erro
对于我的web应用程序,我将RequireJS集成到AngularJS + ASP.NET WEB API应用程序。但是,现在$http服务不能获取数据。
我引用了:来设置用于动态加载控制器的require js。
我的控制器代码:
'use strict';
define(['app'], function (app) {
var CategoryController = function ($scope, $http) {
$http.get('/api/Values/GetCategoryProducts'
嘿。我刚刚将我的应用程序更新到了angular 4.4.3和最新的angular材质。经过大量的错误后,我现在只得到一个,但它看起来有点困惑,因为它很难理解是什么名称的文件错误。我收到错误:
(SystemJS) Invalid provider - only instances of Provider and Type are allowed, got: [object Object]
Error: Invalid provider - only instances of Provider and Type are allowed, got: [object Object]
我有一个问题,因为我的应用程序被迁移到角12。
我的应用程序启动时没有出错。打开某些页面时,我会得到以下错误:
core.js:6498 ERROR Error: Uncaught (in promise): Error: BrowserModule has already been loaded.
If you need access to common directives such as NgIf and NgFor from a lazy loaded module,
import CommonModule instead.
Error: BrowserModule