AngularJS fail to load module

后端 未结 6 1663
南方客
南方客 2021-01-04 04:43

EDIT: This only happens with IE (tested on IE10)

I have a app that loads fine initially, however, when refreshed it gives this error:

SCRIPT50

6条回答
  •  余生分开走
    2021-01-04 05:21

    I had this very same problem, only in IE9. Lower versions of IE actually worked fine, as did newer browsers.

    Manually bootstrapping solved the problem, but threw an error "Unknown Provider" for a filter that is part of my module. Note that the filter still seemed to be functioning as expected.

    In the end, the solution that solved my problem and ceased the errors from being thrown at all was to simply rename the module file to be the same as the module.

    So if the name of my module was myAppModule then the filename should be myAppModule.js and not my_app_module.js.

提交回复
热议问题