AngularJS には、次の関数があり、正常に機能しました。
$http.get( "fruits.json" ).success( $scope.handleLoaded );
これをファイルからURLに変更したいと思います(甘いLaravel 4を使用してjsonを返します):
$http.get( "http://localhost/fruitapp/fruits").success( $scope.handleLoaded );
私が得るエラーは次のとおりです。
"NetworkError: 405 Method Not Allowed - http://localhost/fruitapp/fruits"
どうしたの?fruit.json が「ローカル」で、localhost がそうではないためですか?