加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari

发布时间:2020-12-17 07:50:17 所属栏目:安全 来源:网络整理
导读:应用程序在Chrome和IE(11)中运行良好,但在Firefox(42.0)或Safari(5.1.7)中无效. FIREFOX: 改变对象的[[Prototype]]会导致代码运行得非常慢;而是使用Object.create es6-shim.js创建具有正确的初始[[Prototype]]值的对象:1338:11 Angular 2正在开发模式下运
应用程序在Chrome和IE(11)中运行良好,但在Firefox(42.0)或Safari(5.1.7)中无效.

FIREFOX:

改变对象的[[Prototype]]会导致代码运行得非常慢;而是使用Object.create es6-shim.js创建具有正确的初始[[Prototype]]值的对象:1338:11

Angular 2正在开发模式下运行.调用enableProdMode()以启用生产模式. angular2.dev.js:351:5

EXCEPTION:错误:期望int32作为第二个参数angular2.dev.js:23524

BrowserDomAdapter</BrowserDomAdapter.prototype.logError() angular2.dev.js:23514
BrowserDomAdapter</BrowserDomAdapter.prototype.logGroup() angular2.dev.js:23525
ExceptionHandler</ExceptionHandler.prototype.call() angular2.dev.js:1145
PlatformRef_</PlatformRef_.prototype._initApp/</<() angular2.dev.js:14801
NgZone</NgZone.prototype._notifyOnError() angular2.dev.js:5796
NgZone</NgZone.prototype._createInnerZone/errorHandling<.onError() angular2.dev.js:5700
run() angular2-polyfills.js:141

map@http://localhost:53861/lib/es6-shim/es6-shim.js:1113:14
TemplateParseVisitor</TemplateParseVisitor.prototype._createDirectiveAsts@http://localhost:53861/lib/anguar2/angular2.dev.js:24301:27
TemplateParseVisitor</TemplateParseVisitor.prototype.visitElement@http://localhost:53861/lib/anguar2/angular2.dev.js:24154:24
HtmlElementAst</HtmlElementAst.prototype.visit@http://localhost:53861/lib/anguar2/angular2.dev.js:20216:14
htmlVisitAll/<@http://localhost:53861/lib/anguar2/angular2.dev.js:20227:23
forEach@http://localhost:53861/lib/es6-shim/es6-shim.js:1107:14
htmlVisitAll@http://localhost:53861/lib/anguar2/angular2.dev.js:20226:5
TemplateParser</TemplateParser.prototype.parse@http://localhost:53861/lib/anguar2/angular2.dev.js:24038:20
TemplateCompiler</TemplateCompiler.prototype._compileComponentRuntime/done<@http://localhost:53861/lib/anguar2/angular2.dev.js:24669:32
run@http://localhost:53861/lib/anguar2/angular2-polyfills.js:138:14
NgZone</NgZone.prototype._createInnerZone/<.$run/<@[…]

苹果浏览器:

EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
angular2.dev.js:23514ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
Potentially unhandled rejection [2] Error: EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
	Error loading http://localhost:53861/app/bootDesktop.js

关于什么是错误的任何想法都非常感激.看起来它与“BrowserDomAdapter”有关.

通过升级es6-shim来解决问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读