問題タブ [iron-router]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
meteor - Meteor Iron Router - Why does my app always goes to the base url on refresh or url load
I have a meteor app that uses iron router. Every time I refresh the browser or input a url like http://localhost:3000/gigs
my app refreshes back to the base url of just http://localhost:3000
Here is my router.js code
The strange thing is that if I change the 'tasks' path to be '/tasks' instead of '/' this problem doesn't occur and it works as I would expect it to. However when I do that I get a console error message that no '/' is defined. It doesn't seem to break anything but I hate having errors in the console.
I've also tried moving the 'tasks' map to the bottom in case it was matching first on this one and always going there, but that didn't make a difference.
Any idea why this is happening?
Thanks!
meteor - アプリを流星にデプロイしたが、コンソールからエラーが発生しました
私は流星に展開したプロジェクトを手に入れました
ただし、コンソールを見ると次のエラーが表示されます。
キャッチされていないエラー: ああ、いや! パスのルートが見つかりません: "/"
localhost でデバッグ モードと --production サーバーを試しましたが、正しく動作しています。
展開後の流星ではありません。
私は本当にどこを見ればいいのかわからない。
meteor - Meteor Iron-router が loadingtemplate を永遠にロードし続ける
なぜ合格しなかったのかを理解するのに多くの時間を費やしました (loadingtemplate を定義した後):
それは、loadingtemplate を表示し続けました。
meteor - Handlebars yield error with '/:username' param
I set up my router so that if someone types in sitename.com/:username, it goes directly to that users page. But for some reason, when I attempt to do this I sometimes get redirected to my home page and get this error in the console.
It's even more strange because I would say 60% of the time it loads fine and there are no issues. Does anyone familiar with Meteor, Handlebars, and the Iron-Router package know about this or can help?
If you need more code let me know.
Here is the routing. I added the wait() call at the end to see if that would help. It seems to have helped a bit but the error still occurs.
meteor - IronRouter および Meteor を使用して動的に値を設定するセッション変数が設定されない
私の Meteor アプリケーションでは、IronRouter を使用してセッション変数を動的に生成しているため、ルーターをロードするときに「after」ブロックの一部として使用しています。残念ながら、Session 変数は生成されず、pageTitle と Subtitles の動的な値は読み込まれません。ただし、奇妙なことに、ブラウザーコンソールからセッション変数を手動で設定すると機能します。
ここに私のルーターコードがあります:
私もこのイナ・ビフォア・ブロックを試しました。
ヘルパー関数は次のとおりです。
});
レンダリングするテンプレートのブロックは次のとおりです。
助けてくれてありがとう。
meteor - 鉄のルーターまたは隕石自体を使用してファイルを提供する方法は?
Meteor アプリで zip ファイルを提供しようとしていますが、行き詰っています。多くのグーグルの後、Iron Routerを使用するのが最善の方法のようですが、方法がわかりません:
meteor - Meteor + Iron Router + JSZip が機能しない
Meteor を使用して zip ファイルを作成して提供しようとしています。ここに私が持っているものがあります:
jszip.min.js と jszip-deflate.js があります。zipファイルが作成され、ダウンロードできるのですが、アーカイブマネージャでファイルを開くことができません(破損しています)。テキスト エディタで data.zip を開くと、「PK」と 2 つの 16 進文字が表示されます。
zip ファイルを作成して返すにはどうすればよいですか?
答え:
圧縮にデフォルトの base64 エンコーディングを使用し、end/write メソッドで応答エンコーディングを指定します。
meteor - Iron Router を使用してデプロイされたアプリから のコレクションにアクセスしようとすると、Meteor ReferenceError が発生する
私のアプリは完全にローカルで機能します。ただし、それを展開すると、コレクションの投稿がアクセスされると想定されるページの javascript コンソールに次のエラーが表示されます。
これは私が使用しているルーターのjavascriptファイルで、デプロイ時にロードされないテンプレートpostsListsに投稿を渡します。
このサイトには、 fed.meteor.comからもアクセスできます。
前もって感謝します。
json - meteor から HTTP POST データにアクセスするにはどうすればよいですか?
HTTP POST リクエストを介して緯度/経度データを受信したい Iron-router ルートがあります。
これは私の試みです:
ただし、次の方法でサーバーにクエリを実行します。
を返します{}
。
投稿params
データが含まれていない可能性がありますか?オブジェクトとリクエストを検査しようとしましたが、見つかりません。