ngdocs:Cannot 读取 属性 'replace' 未定义
ngdocs:Cannot read property 'replace' of undefined
每当我们 运行 gulp/grunt 使用 ngdocs npm 模块文档文件夹的任务生成时,如果我们在控制台中单击 index.html 它会抛出以下错误
TypeError: Cannot read property 'replace' of undefined
at Gb (angular.js:10638)
at Me.$get (angular.js:11465)
at Object.e [as invoke] (angular.js:4219)
at angular.js:4037
at d (angular.js:4178)
at Object.e [as invoke] (angular.js:4210)
at angular.js:4037
at d (angular.js:4178)
at Object.e [as invoke] (angular.js:4210)
at angular.js:6547
我们得到这个错误是因为 chrome,出于安全原因不允许从文件系统加载东西,所以解决方案是 运行 我们目录中的服务器(即 http-server)和然后在 localhost:portnumber
查看文件
每当我们 运行 gulp/grunt 使用 ngdocs npm 模块文档文件夹的任务生成时,如果我们在控制台中单击 index.html 它会抛出以下错误
TypeError: Cannot read property 'replace' of undefined
at Gb (angular.js:10638)
at Me.$get (angular.js:11465)
at Object.e [as invoke] (angular.js:4219)
at angular.js:4037
at d (angular.js:4178)
at Object.e [as invoke] (angular.js:4210)
at angular.js:4037
at d (angular.js:4178)
at Object.e [as invoke] (angular.js:4210)
at angular.js:6547
我们得到这个错误是因为 chrome,出于安全原因不允许从文件系统加载东西,所以解决方案是 运行 我们目录中的服务器(即 http-server)和然后在 localhost:portnumber