0

クローンを作成し、https://github.com/linnovate/meanから MEAN スタックの新しいバージョンをインストールしてから、うなり声で実行しました。

ルート ページの末尾に URL セグメントが追加されていることに気付きました。/#!/すべてのページが次のようになっています。

http://localhost:3000/#!/
http://localhost:3000/#!/articles/
...

/#!/そのURL セグメントを取り除く方法に関するヒントはありますか? これが Node/Angular/Express 設定かどうかはわかりません。

4

1 に答える 1

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']);
 });

なぜそれを持っていないことが問題を引き起こすのかを理解しているとは主張していませんが、なぜそれがすべてのページに表示されるのかわかりませんか?

于 2014-02-13T13:14:34.950 に答える