[英]/#!/ url segment in Nodejs MEAN Stack (Mean.io) clean install
I've cloned, installed a fresh version of the MEAN stack from https://github.com/linnovate/mean , and then ran with grunt. 我已经克隆了,从https://github.com/linnovate/mean安装了MEAN堆栈的新版本,然后发出咕gr的声音。
I've noticed that my root page is appending a /#!/
url segment to the end, and all my pages look something like: 我注意到我的根页面在末尾附加了一个/#!/
url段,并且我的所有页面看起来都像这样:
http://localhost:3000/#!/
http://localhost:3000/#!/articles/
...
Any hints on how to get rid of that /#!/
url segment? 关于如何摆脱/#!/
网址段的任何提示? I can't tell if this is a Node/Angular/Express setting. 我不知道这是一个Node / Angular / Express设置。
This is in Angular.js and it is commented in the file on github as to why it is there 这在Angular.js中,并在github上的文件中对其存在的原因进行了注释
https://github.com/linnovate/mean/blob/master/public/js/init.js 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']);
});
Although I do not claim to understand why not having it would cause an issue and I'm not sure why it presents itself on every page? 尽管我不主张理解为什么不使用它会导致问题,而且我不确定为什么它出现在每一页上?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.