2015-07-21 34 views
0

爲什麼我會得到這個使用http放入角js更新json數據時出錯?

PUT文件:/// C:/用戶/用戶/文件/工作/ someapi /字/ 15網:: ERR_FILE_NOT_FOUND 當我更新

$http({ 
    url: url + Id, 
    method: "PUT", //update 
    dataType: 'json', 
    data: JSON.stringify({ 
     Id: '154', 
     word: $scope.new, 
     Date: new Date(), 
    }), 
    headers: { 
     'Content-Type': 'application/JSON' 
    } 

    }) 
    .success(function(result) { 
    console.log(result); 
    }) 

上午不更新文件。我很困惑。

+0

您可以分享您設置的網址嗎? –

+0

@ Chander.k謝謝,網址缺少http:// :) – aye26

回答

1

請檢查URL是否有效。請確保您使用的網址是http://,https://,網址爲