且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法读取未定义的属性"getDOM"

更新时间:2021-09-09 06:29:57

升级到4.0.0后,我遇到了类似的错误,但是我的问题是@ angular/http.

I had a similar error after upgrading to 4.0.0, but mine was with @angular/http.

结果是我的package.json中没有@ angular/http,但是我的js文件副本存在于最终输出目录(http.umd.js)中.

Turns out that I didn't have @angular/http in my package.json, but I had a copy of the js file existing in my final output directory (http.umd.js).

因此,那里的http版本仍然很旧.因此,请确保您没有从package.json中缺少必需的库之一.

Because of this, the version of http that was out there was still old. So make sure that you aren't missing one of the required libraries from your package.json.

我的第一个线索是@ angular.http在Visual Studio中的Dependencies/npm下是错误的版本,并且旁边有多余的".

My first clue was that @angular.http was the wrong version under Dependencies/npm in Visual Studio and had "extraneous" next to it.