升级到Angular 5、splitHash错误
Upgrading to Angular 5, splitHash error
我目前正在从 Angular 4.x 升级到 5.x 并且 运行 出现以下错误:
main.81bcdf404dc22078865d.bundle.js:1 Uncaught TypeError: i.splitHash is not a function
at Object.t.parseUrl (main.81bcdf404dc22078865d.bundle.js:1)
at t.path (main.81bcdf404dc22078865d.bundle.js:1)
at e.<anonymous> (main.81bcdf404dc22078865d.bundle.js:1)
at e.V9yc.t.UrlRouter.e.sync (main.81bcdf404dc22078865d.bundle.js:1)
at bs (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at vt (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at new e (main.81bcdf404dc22078865d.bundle.js:1)
at Object.Dt [as createNgModuleRef] (main.81bcdf404dc22078865d.bundle.js:1)
如果我做 'ng lint' 我通过,'ng build --prod' 我通过,'ng serve' 我通过。但是当我执行 'ng serve --prod' 时,我在运行时遇到了这个错误,我无法弄清楚是什么原因造成的。我认为这可能是 ui-router 版本问题,但升级到 "@uirouter/angular": "1.0.0-rc.1"
(以及低于它的所有版本)没有做任何事情。还有其他人 运行 处理过这个问题吗?
再次尝试升级,这次成功了。我想我没有正确升级我所有的库。
我相信当我收到此错误时,我仍在尝试使用 2.0.0-beta.12 中的 angular 库,如动画、cdk、common 等。现在它们是 5.1.0 并且似乎运行良好。
我目前正在从 Angular 4.x 升级到 5.x 并且 运行 出现以下错误:
main.81bcdf404dc22078865d.bundle.js:1 Uncaught TypeError: i.splitHash is not a function
at Object.t.parseUrl (main.81bcdf404dc22078865d.bundle.js:1)
at t.path (main.81bcdf404dc22078865d.bundle.js:1)
at e.<anonymous> (main.81bcdf404dc22078865d.bundle.js:1)
at e.V9yc.t.UrlRouter.e.sync (main.81bcdf404dc22078865d.bundle.js:1)
at bs (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at vt (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at new e (main.81bcdf404dc22078865d.bundle.js:1)
at Object.Dt [as createNgModuleRef] (main.81bcdf404dc22078865d.bundle.js:1)
如果我做 'ng lint' 我通过,'ng build --prod' 我通过,'ng serve' 我通过。但是当我执行 'ng serve --prod' 时,我在运行时遇到了这个错误,我无法弄清楚是什么原因造成的。我认为这可能是 ui-router 版本问题,但升级到 "@uirouter/angular": "1.0.0-rc.1"
(以及低于它的所有版本)没有做任何事情。还有其他人 运行 处理过这个问题吗?
再次尝试升级,这次成功了。我想我没有正确升级我所有的库。
我相信当我收到此错误时,我仍在尝试使用 2.0.0-beta.12 中的 angular 库,如动画、cdk、common 等。现在它们是 5.1.0 并且似乎运行良好。