我克隆了,从https://github.com/linnovate/mean安装了一个新版本的MEAN堆栈,然后用grunt运行。
我注意到我的根页面在末尾附加了/#!/
个网址段,而我的所有网页看起来都像:
http://localhost:3000/#!/
http://localhost:3000/#!/articles/
...
有关如何摆脱/#!/
网址段的任何提示?我不知道这是否是Node / Angular / Express设置。
答案 0 :(得分:0)
这是在Angular.js中,它在github上的文件中注释为什么它在那里
https://github.com/linnovate/mean/blob/master/public/js/init.js
'use strict';
angular.element(document).ready(function() {
//Fixing facebook bug with redirect
if (window.location.hash === '#_=_') window.location.hash = '#!'; //Then init the app angular.bootstrap(document, ['mean']);
});
虽然我没有声称理解为什么不让它导致问题,我不确定为什么它会出现在每一页上?