简体   繁体   English

ngx-image-cropper IE-11 不工作 angular 7.2

[英]ngx-image-cropper IE-11 not working angular 7.2

We are facing very unique issue in which Cropper is not working in IE 11 browser environment, some time out of stack space is coming,some time no errors come but cropper also does not generated.我们面临一个非常独特的问题,即 Cropper 无法在 IE 11 浏览器环境中工作,堆栈空间即将耗尽,有时没有错误出现,但cropper 也不会生成。 在此处输入图像描述 Screenshot attached of how its looking in IE11 this is the screen after selecting the image to upload.附加的屏幕截图显示了它在 IE11 中的外观,这是选择要上传的图像后的屏幕。

FOR REF: https://www.npmjs.com/package/ngx-image-cropper this is the link in which you can find pollyfill for IE we have used with the pollyfill given by angular https://angular.io/guide/browser-support FOR REF: https://www.npmjs.com/package/ngx-image-cropper这是您可以找到用于 IE 的 pollyfill 的链接,我们已将其与 angular Z5E056Z500A7DZZ5E0515C500AD18C4B7B6A 给出的 pollyfill一起使用/浏览器支持

The "Out of Stack Space" error in your JavaScript programming language is generally referred to as stack overflow. JavaScript 编程语言中的“堆栈空间不足”错误通常称为堆栈溢出。 When you are using JavaScript the functions it uses are copied into the memory.当您使用 JavaScript 时,它使用的功能被复制到 memory 中。 The memory on the JavaScript is called the "stack." JavaScript 上的 memory 称为“堆栈”。 If the function you are using is stacked and the script needs another function, they are both stacked together.如果您使用的 function 是堆叠的,并且脚本需要另一个 function,则它们都堆叠在一起。 This exceeds the stack limit and causes the "Out of Stack Space" error.这超出了堆栈限制并导致“堆栈空间不足”错误。

You can refer steps below may help to fix this error.您可以参考以下步骤可能有助于修复此错误。

Step 1:步骤1:

Open the JavaScript in your Document Object Model program.在文档 Object Model 程序中打开 JavaScript。 Check your script for an "infinity looping" function.检查您的脚本是否存在“无限循环”function。 When a function calls itself, the function will use conditional statements to make sure that the function never loops over itself.当 function 调用自身时,function 将使用条件语句来确保 function 永远不会自循环。

Step 2:第2步:

Check your script for two functions that are calling on each other to form the infinity loop.检查您的脚本是否有两个函数相互调用以形成无限循环。 You may have three or more infinity loops in your script.您的脚本中可能有三个或更多无限循环。 Use conditional statements to guard your code against the loop.使用条件语句来保护您的代码免受循环的影响。

Step 3:第 3 步:

Check your script for high levels of recursive functions.检查您的脚本以获取高级递归函数。 A recursive function is a function that repeats back to a former part of the script.递归 function 是一个 function 重复回到脚本的前一部分。 If you don't have your recursive functions in line, you could start an infinite loop back and forth, causing the "Out of Stack Space" error.如果您没有串联递归函数,则可以来回启动无限循环,从而导致“堆栈空间不足”错误。

Step 4:第4步:

Build your very own stack, so you know there are no infinity loops in the code.构建您自己的堆栈,因此您知道代码中没有无限循环。 Open your Document Object Model and start writing the script.打开您的文档 Object Model 并开始编写脚本。 Keep your counter variables throughout the script so you know there is no infinity looping throughout the code.在整个脚本中保留您的计数器变量,以便您知道整个代码中没有无限循环。

For information, you can refer this link.有关信息,您可以参考此链接。

How to Repair the Error "Javascript Is Out of Stack Space" 如何修复“Javascript 堆栈空间不足”错误

If this error is coming from the polyfill and you are not able to fix it by referring the above steps then I suggest you to provide feedback to the developer of that polyfill.如果此错误来自 polyfill,并且您无法通过参考上述步骤来修复它,那么我建议您向该 polyfill 的开发人员提供反馈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM