0
私はionic frameworkでアプリケーションを開発しています。私はサーバーにファイルをアップロードして応答を返し、ファイル名はlocalstorage
に保存します。今私の問題は、応答がlocalstorage
に保存されるときです。私はfilename
というテキストボックスに値を入れたいと思っています。どうすればいいですか?localstorageの値をionicとangualrのテキストボックスに入れます
function win(r) {
//alert("Response =" + r.response);
window.localStorage.setItem("picture",r.response)
{$ionicLoading.hide();}
$scope.filename = localStorage.getItem('picture');
//console.log("Code = " + r.responseCode);
//console.log("Response = " + r.response);
//console.log("Sent = " + r.bytesSent);
}
HTML
<label class="item item-input item-stacked-label">
<span class="input-label">Fashion Line</span>
<input name="filename" type="text" id="filenaname" ng-model="filename" >
</label>
具体的な問題は何ですか?テキストボックスhtmlを表示します。 'ng-model'を使っていますか?常に[mcve]を提供してください – charlietfl
何が問題なのですか? 'console.log($ scope.filename);とは何ですか?言った? –
は 'r.response'文字列またはオブジェクトですか? –