JavaScript 运行时错误 : unable to get property 'replace' of undefined or null reference

标签 javascript angularjs

我已经在这个论坛上看到过有关此错误的帖子,但我仍然无法弄清楚代码中的哪个位置触发了 JavaScript 错误。调用堆栈仅显示 angular.js 代码。它们都不是我的代码。因此很难查明问题出在哪里。当我单击“继续”时,我的应用程序的主页显示,但没有任何导航链接可导航。每个链接都有相同的 url。 “http://localhost:52334/myApp/#:”。我的应用程序在 IIS Express 上运行。 _Layout.cshtml中有一个。感谢您的帮助。

enter image description here

enter image description here

最佳答案

Thank you for the response. My application works when I changed 
from <base href="/myApp/" />
to <base href="/myApp" /> or <base href="/" />.

关于JavaScript 运行时错误 : unable to get property 'replace' of undefined or null reference,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32731850/

相关文章:

java - Angular 元素定位

javascript - Angular JS UI 路由器不工作

angularjs - Angular 输入限制为 1 个字符

javascript - 内部js文件和外部js文件的主要区别

javascript - Angular 异步事件的问题

javascript - Joomla - "Menu Item Type"弹出窗口为空

javascript - Google map 不支持 Angular Routing

javascript - v-on :click not working bootstrap

javascript - 简单的 AngularJS 路由不起作用

javascript - 从它的父[angularJS]触发子指令中的函数