詳しくはこちらへ → https://www.facebook.com/groups/toretatech/
詳しくはこちらへ → https://www.facebook.com/groups/toretatech/
概要 AngularJSでFormDataをPOSTしたいときがある。 たとえばFileをアップロードするときとか、$httpをそのまま使ってもうまく行かない。 というのも、$httpのpostはデフォルトではContent-typeがapplication/jsonだからだ。 もちろんRequestはjsonにエンコードされる。 なので、適切なContent-typeとエンコードにする必要がある。 FormData? var formData = new FormData(); formData.append('formのnameにあたる部分','内容'); って感じでつかうやつ。 内容の部分はファイルの場合はもちろんファイルになる。 このformDataをそのままpostの第二引数に渡す。 ファイル? input type="file"のchangeイベントを捕まえたり、ドラッグ&ドロ
http://eviltrout.com/2014/01/04/hiding-offscreen-ember.html1 comment | 0 pointsDiscourseのRobin Wardが、Ember.jsで無限スクロールのパフォーマンスを改善させた取組みについて紹介しています。 Long Lived Applications Discourseは無限スクロールを多用している。投稿数の多いトピックを閲覧している際に、ブラウザのviewportの終わりに近づくと、サーバから非同期に新しい投稿が読込まれる。短いトピックについては、DOMにコンテンツを追加することはパフォーマンスの問題にはならない。最近のブラウザは、モバイルであっても、数百の投稿はレンダリングできる。しかし、数千件の投稿があるトピックを閲覧する時は、ブラウザの動きが不安定になり、クラッシュすることもあった。 Cloa
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く